Commit graph

2699 commits

Author SHA1 Message Date
Protesilaos Stavrou 0088add0ad
Make modus-themes-generate-palette define more mappings 2025-11-25 08:17:20 +02:00
Protesilaos Stavrou e49b1e0248
Reword some parts of the section about modus-themes-generate-palette 2025-11-25 07:41:56 +02:00
Protesilaos Stavrou c15eea4125
Write the manual's detailed guide for modus-themes-generate-palette
We can always refine the implementation details, but at least the
results are looking very promising. I think/hope users will benefit
from this enhancement.
2025-11-24 19:39:38 +02:00
Protesilaos Stavrou 80db306ddb
Update the modus-themes-generate-palette doc string 2025-11-24 17:39:56 +02:00
Protesilaos Stavrou ec8f8a80b1
Conditionally push to mappings in modus-themes-generate-palette
I think this is done now. All that remains is to (i) polish the
derived colors because some of them are not nice and (ii) check the
code again to make sure I am not being sloppy.
2025-11-24 14:51:04 +02:00
Protesilaos Stavrou 4694dc5a8b
Resolve the duplicates and prioritisation in modus-themes-generate-palette 2025-11-24 14:49:25 +02:00
Protesilaos Stavrou 78e79d3eba
Reindent modus-themes-generate-palette 2025-11-24 14:18:08 +02:00
Protesilaos Stavrou 2c85a495cb
Push a derived colour only if needed in modus-themes-generate-palette
I want to do the same for the mappings, but I will have to go soon...
2025-11-24 14:13:22 +02:00
Protesilaos Stavrou 24d426e59b
Use cadr not cdr in modus-themes-generate-palette 2025-11-24 14:08:21 +02:00
Protesilaos Stavrou ed618c1050
Add two error checks for the type of modus-themes-generate-palette arguments 2025-11-24 13:54:41 +02:00
Protesilaos Stavrou 51dd0362b9
Fix a typo 2025-11-24 13:54:33 +02:00
Protesilaos Stavrou 1a7867074e
Make modus-themes-generate-palette require at bg-main and fg-main 2025-11-24 13:48:16 +02:00
Protesilaos Stavrou feecb71130
Make modus-themes-generate-palette accept optional mappings and refine its internals
I wrote those changes earlier, but then forgot to commit. Then I came
back and accidentally reverted/destroyed what I had... This is going
off of memory, but I will need to check again.
2025-11-24 13:41:05 +02:00
Protesilaos Stavrou 0730b28045
Add missing fullstop in first line of modus-themes-generate-palette doc string 2025-11-24 12:08:46 +02:00
Protesilaos Stavrou a416bc4906
Add missing autoload for modus-themes-generate-palette 2025-11-24 12:08:38 +02:00
Protesilaos Stavrou 823d31d19b
Use optional preference for modus-themes-generate-palette 2025-11-24 07:37:53 +02:00
Protesilaos Stavrou 72bf76eb84
Define prototype of modus-themes-generate-palette
I will document it later. First I want to make sure it works decently.
2025-11-24 07:18:19 +02:00
Protesilaos Stavrou ef3e513dfe
Add the missing registration of derivative themes in modus-themes-theme 2025-11-24 07:17:49 +02:00
Protesilaos Stavrou 5af03b7294
Add comment about doing something like modus-themes--box for some underlines 2025-11-23 18:34:17 +02:00
Protesilaos Stavrou 23e443a016
Pass correct attributes when ':box (:color unspecified)'
We have to make sure that the value passed to :color is not
'unspecified'. Users may want to do this, given the option they have
via the overrides, and it is a fine use of the system. Internally
though, we have to adjust the :box to do the right thing instead of
throwing an error.

Thanks to JD Smith for reporting a bug along those lines in issue 9 of
my standard-themes repo (they are derived from the modus-themes, hence
the changes here): <https://github.com/protesilaos/standard-themes/issues/9>.
I am generalising the fix for all faces that could exhibit the same
problem. I will check if we need to do the same for some of the underlines.
2025-11-23 18:21:15 +02:00
Protesilaos Stavrou a472f54645
Update modus-themes-define-derivative-command-known-suffixes to include select-{dark,light} 2025-11-22 16:48:12 +02:00
Protesilaos Stavrou c270cd8f5e
Implement convenience commands modus-themes-select-{dark,light} 2025-11-22 14:15:36 +02:00
Protesilaos Stavrou 26d60d3e6b
Disambiguare calendar-today from org-date-selected
This is because both can appear in the same context, whereas I thought
this would never happen.

Thanks to Rudolf Adamkovič for discussing this with me in the context
of the same change for my doric-themes (issue 20):
<https://github.com/protesilaos/doric-themes/issues/20>.
2025-11-22 11:41:47 +02:00
Protesilaos Stavrou 53717d1607
Support transient-semantic-coloring (also see commit 81862df) 2025-11-19 07:29:04 +02:00
Protesilaos Stavrou 81862dfa99
Define modus-themes-faces-deuteranopia and modus-themes-faces-tritanopia
These are meant to be applied as a deviation from modus-themes-faces,
as they are specific to the needs of users with the given colour deficiency.
2025-11-19 07:28:04 +02:00
Protesilaos Stavrou 065fbe15e7
Remove transient named colour faces that do not exist anymore 2025-11-19 07:27:26 +02:00
Protesilaos Stavrou 2602e2c0db
Use more appropriate style for completion-preview-exact and add note about it 2025-11-18 19:30:35 +02:00
Protesilaos Stavrou 3ddb82b37b
Add explicit support for the built-in completion-preview-mode faces
We want to do this because completion-preview-exact hardcodes a colour
value, which does not work for our purposes.

Thanks to Kevin Fleming for asking me about this in issue 178:
<https://github.com/protesilaos/modus-themes/issues/178>.
2025-11-18 12:38:20 +02:00
Protesilaos Stavrou f79684961e
Use optional bold weight for hl-todo faces
This is how we were doing it before until I undid it by mistake.

Thanks to Dominik Schrempf for reporting the bug in issue 177:
<https://github.com/protesilaos/modus-themes/issues/177>.
2025-11-17 12:14:45 +02:00
Protesilaos Stavrou 88fca8fd42
Change how we get the palette for modus-themes-with-colors
This makes it so derivative theme actually get their own colours
instead of those coming from the core theme. Same for user-defined
palette overrides.

Another advantage of this approach is that we keep a separation of
concerns between the different uses we have for the palettes we
retrieve and the structure we want them to have. I prefer this over a
helper function that has to behave according to some optional
parameter.

This is in response to issue 175 by Fritz Gabo, which reports a bug
about derivative themes not getting the right colours when using
modus-themes-with-colors: <https://github.com/protesilaos/modus-themes/issues/175>.

Also thanks to Roshan Shariff for testing my suggested changes (i.e.
this diff) and informing me of getting the expected results out of them.
2025-11-15 13:37:13 +02:00
Protesilaos Stavrou b9eb16d1a1
Make neo-vc-removed-face consistent with vc-removed-state (see commit e08fb8a)
Thanks to Morgan Willcock for discussing with me the use of the
:strike-through style in issue 169: <https://github.com/protesilaos/modus-themes/issues/169>.

The plan is to review all uses of :strike-through to determine which
ones actually benefit from it.
2025-11-14 10:05:00 +02:00
Protesilaos Stavrou e08fb8adcd
Use a wavy underline for vc-removed-state 2025-11-14 10:04:48 +02:00
Protesilaos Stavrou bb548f6564
Use a wavy underline and warning colour for vc-missing-state 2025-11-14 10:04:42 +02:00
Protesilaos Stavrou 3058909617
Use warning instead of err for the vc-dir-status-warning
We use the err colour in other places.
2025-11-14 10:01:13 +02:00
Protesilaos Stavrou ee27621ce8
Use a wavy underline style for Notmuch tag addition and removal
This way the notmuch-tag-deleted is not using a style that is unique
to it. The wavy underline is easy to spot and does not obfuscate the
text of the tag.

Thanks to Morgan Willcock for discussing with me the use of the
:strike-through style in issue 169: <https://github.com/protesilaos/modus-themes/issues/169>.

The plan is to review all uses of :strike-through to determine which
ones actually benefit from it.
2025-11-14 09:42:14 +02:00
Protesilaos Stavrou 0e3b21ef87
Improve the consistency of transient.el unavailable indicators 2025-11-14 07:04:51 +02:00
Protesilaos Stavrou 0cd0b3cc7b
Diversify symbol-overlay faces to all have unique background colours
That was the case before, but I must have changed it by accident when
I was removing most of the :inherit attributes.
2025-11-12 14:29:31 +02:00
Protesilaos Stavrou 3b0850883a
Stop using readable-foreground-color for the org-habit faces
It breaks the themes when they loaded via the early-init.el, as
reported by Gaston Cabotin in issue 174:
<https://github.com/protesilaos/modus-themes/issues/174>.
2025-11-12 08:14:06 +02:00
Protesilaos Stavrou c94938ff79
Greatly expand the manual with complete examples of creating Modus derivatives
This covers the basic and more advanced use cases. It also is for both
private use and making new packages.
2025-11-10 13:02:49 +02:00
Protesilaos Stavrou 4c6a73dc71
Make modus-themes-with-colors use the correct order for palette entries
This affects how the overrides are handled when they mention  a
semantic palette mapping, which itself is a semantic palette mapping.

Thanks to Alexandr Semenov for reporting a relevant bug and testing
this diff in issue 170: <https://github.com/protesilaos/modus-themes/issues/170>.
2025-11-09 11:57:24 +02:00
Protesilaos Stavrou d46e782510
Make gnus-button less intrusive
It is not really a link and it also gets applied to a lot of places
that should not look exactly like links.

Thanks to Morgan Willcock for discussing this with me in issue 140:
<https://github.com/protesilaos/modus-themes/issues/140>.
2025-11-09 11:41:10 +02:00
Protesilaos Stavrou 4fd8cdfc55
Update to modus-themes version 5.1.0 2025-11-07 07:53:36 +02:00
Protesilaos Stavrou bbaa20a45b
Add missing NO-ENABLE to theme check in modus-themes-with-colors-subr
I added that parameter specifically for this case. When I was
committing edd5b66, I thought I had passed it here, but apparently I
did not because that commit also reverted 5777db8...
2025-11-06 10:00:59 +02:00
Protesilaos Stavrou a1149ce5e7
Clarify that a derivative theme has to be in a file among custom-theme-load-path
Thanks to Ashton Wiersdorf for asking for clarification about this in
issue 171: <https://github.com/protesilaos/modus-themes/issues/171>.
2025-11-05 12:55:45 +02:00
Protesilaos Stavrou edd5b66833
Revert 1b66344 and tweak how modus-themes-with-colors binds display spec and 'unspecified'
For some reason the macro was no longer working with commit 1b66344
after I restarted Emacs. Will investigate further. This should
nevertheless be the final commit that fixes all known issues with
modus-themes-with-colors.
2025-11-05 12:39:11 +02:00
Protesilaos Stavrou 5777db8d9b
Fix error with positional argument in latest commit 9c65704 2025-11-05 12:28:41 +02:00
Protesilaos Stavrou 9c65704b61
Avoid recursion in modus-themes-with-colors through enable-theme-functions
The modus-themes-with-colors should either work on an already loaded
theme or do nothing. Otherwise with the enable-theme-functions we end
up with excessive lisp nesting.

Thanks to Alexandr Semenov for reporting the bug in issue 170:
<https://github.com/protesilaos/modus-themes/issues/170>.
2025-11-05 12:21:05 +02:00
Stefan Monnier 1b663444fe
Make modus-themes-with-colors evaluate body as a function
See the discussion on the emacs-devel mailing list:
<https://lists.gnu.org/archive/html/emacs-devel/2025-11/msg00114.html>.
2025-11-05 10:07:49 +02:00
Protesilaos Stavrou 11329d1c49
Make modus-themes--with-colors-resolve-palette-sort easier to read and remove second processing for 'unspecified' 2025-11-04 10:44:24 +02:00
Protesilaos Stavrou 0844ec814a
Remove CRITICAL FIXME comment
I think I have fixed it. Will continue testing throughout the day. If
it works, then I will bump the version number to trigger a GNU ELPA
rebuild. Will also updated emacs.git.
2025-11-04 09:50:09 +02:00