Commit graph

1787 commits

Author SHA1 Message Date
Protesilaos Stavrou 247f5803bc
Pass missing LEXICAL to 'eval'
This might be what I was missing the whole time. I think the macro is
working now. Will continue testing...
2025-11-04 07:52:31 +02:00
Protesilaos Stavrou 7e06d30099
Make modus-themes-with-colors call a function and update CRITICAL FIXME findings
The updated code of the macro relative to commit 16c2c66 works
correectly at all times ONLY WHEN the function that uses
modus-themes-with-colors is added to the modus-themes-after-load-theme-hook
and thus triggered by modus-themes-load-theme.

The enable-theme-functions and load-theme combination is not working
though and I need to figure out why. It leads to excessive lisp nesting.
2025-11-04 07:00:58 +02:00
Protesilaos Stavrou 0b67bdfb20
Tweak how modus-themes-known-p works with a symbol argument
There is no point in doing seq-every-p with one element...
2025-11-04 06:36:28 +02:00
Protesilaos Stavrou 4fca99d3ac
Document that modus-themes-get-theme-palette may return nil 2025-11-04 06:36:05 +02:00
Protesilaos Stavrou dda6a00e37
Make modus-themes--get-theme-palette-subr return nil instead of an error for unknown THEME 2025-11-04 06:12:25 +02:00
Protesilaos Stavrou 2bc9c72fbd
Make modus-themes-get-theme-palette more efficient
Otherwise modus-themes-get-current-theme calls modus-themes-get-themes
which is also what modus-themes-known-p needs to do.
2025-11-04 06:08:39 +02:00
Protesilaos Stavrou 72ed98f786
Implement modus-themes--get-theme-sort
This makes it easier to place the return value of 'modus-themes-get-theme-palette'
in a 'let*' because something like '(cursor red-warmer)' will come
after '(red-warmer "#ff0000")'.

This might help me sort out the woes with the excessive lisp nesting
of modus-themes-with-colors (see commits 5e77bff and 4514036), but
looks appropriate anyway.
2025-11-04 05:55:31 +02:00
Protesilaos Stavrou 4514036961
Expand the CRITICAL FIXME for modus-themes-with-colors with the failed macro+function test I did
I tried a few variations of that function, but the point is that I
cannot make the macro work inside of a function that is evaluated at
startup in a user's init file. The same function works after I go and
evaluate it manually.

I stumbled across 'define-inline' while looking around in the Emacs
source code, but I am not sure this is what I need... Will need to
test further.
2025-11-04 05:07:39 +02:00
Protesilaos Stavrou 5e77bff62e
Add detailed CRITICAL FIXME comment about modus-themes-with-colors 2025-11-04 03:26:03 +02:00
Protesilaos Stavrou 68de71e7aa
Make modus-themes-with-colors only work when a theme is current
We do not want to break the enable-theme-functions when it is called
with any other non-Modus theme.
2025-11-03 20:15:01 +02:00
Protesilaos Stavrou 0839a6b3cb
Change the logic of modus-themes-get-current-theme
The previous one was faulty because we would get "the first enabled
Modus theme", even if it was not the current one. Whereas I want the
"first enabled only if it is a Modus theme".
2025-11-03 20:15:01 +02:00
Protesilaos Stavrou 70b31306d0
Never throw an error in modus-themes-known-p
Just return nil or the theme. It is the job of other functions to
produce errors.
2025-11-03 20:15:01 +02:00
Protesilaos Stavrou 1d3bdbd2e5
Reinstate what we were doing with load-theme
This undoes what I was trying to do with commits ef3e0e5 (use 'load'
instead of 'load-themes') and 67b6db3 (let bind hooks to nil).

What I did before was wrong. I was thrown off by the fact that
'enable-theme-functions' works with all themes, not just colour
themes. This includes 'user'. In some tests I also got other
configuration themes like 'use-package' or even the ones that come
from my 'fontaine' and 'spacious-padding' packages. But I did not
bother to figure out when those themes would show up. By default,
at least 'user' is passed to the 'enable-theme-functions'.

With 'emacs -Q':

    (defun test (theme)
      (message "Current theme is `%s'" theme))

    (add-hook 'enable-theme-functions #'test)

    (load-theme 'modus-operandi)

    ;; ;; From the *Messages*:
    ;;
    ;; Current theme is ‘user’
    ;; Current theme is ‘modus-operandi’
2025-11-03 20:12:02 +02:00
Protesilaos Stavrou 88d6a8d721
Make markdown-italic-face always italic 2025-11-03 07:07:46 +02:00
Protesilaos Stavrou ef3e0e5d4d
Use 'load' instead of 'load-theme' for the initial theme reification
This looks cleaner and saves us from the trouble of having to deal
with any hooks after load-theme at this early stage. I took the file
binding from the load-theme source.

Fundamentally, I want to have a theme symbol, like 'modus-operandi'
exist with all the relevant 'theme-properties' so that something like
'modus-themes-list-colors' can work with it even before
modus-operandi-theme.el is loaded.
2025-11-02 17:36:14 +02:00
Protesilaos Stavrou 6e1bdce593
Remove strike-through from jabber-roster-user-offline
It does not lead to a nice result. Thanks to Morgan Willcock for
bringing this matter to my attention in issue 169:
<https://github.com/protesilaos/modus-themes/issues/169>.
2025-11-02 14:43:57 +02:00
Protesilaos Stavrou 67b6db32fb
Disable all hooks when activating the themes the first time 2025-11-02 10:06:28 +02:00
Protesilaos Stavrou 16c2c667c4
Update to modus-themes version 5.0.0 2025-11-01 07:12:53 +02:00
Protesilaos Stavrou 3f3655451b
Make a small clarification to the Commentary of each file 2025-11-01 07:03:21 +02:00
Protesilaos Stavrou d05bd5dde5
Extend modus-themes-preview-mode with commands to copy colors or palette entries 2025-11-01 06:10:50 +02:00
Protesilaos Stavrou 83c34e9726
Make the elisp-feature face use the constant mapping
Normally features get the font-lock-constant-face, but there may be
scenaria where the generic font-lock is not doing the right thing,
whereas the semantic highlighting will. So having this face takes care
of the latter.

Thanks to Eshel Yaron for explaining this to me in the discussion
around Emacs bug 79677: <https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-10/msg01156.html>.
2025-10-31 17:29:38 +02:00
Jimmy Yuen Ho Wong e52f388522
Fix powerline theme definitions for inactive states 2025-10-30 22:47:47 +00:00
Protesilaos Stavrou 223e813805
Swap the style of elisp-shadowed-variable and elisp-shadowing-variable
This is in response to further feedback from Eshel Yaron in Emacs bug
79677: <https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-10/msg01156.html>.
2025-10-30 12:27:17 +02:00
Protesilaos Stavrou acc01872a3
Make the org-list-dt foreground slightly different than the main one 2025-10-30 11:30:21 +02:00
Protesilaos Stavrou 920f7ae8b2
Tweak the org-dispatcher-highlight 2025-10-30 11:29:02 +02:00
Protesilaos Stavrou 0648a01dee
Simplify the minibuffer-depth-indicator 2025-10-30 11:19:27 +02:00
Protesilaos Stavrou 51e067c9df
Change the modus-vivendi-tinted mapping for variable-use 2025-10-30 07:29:15 +02:00
Protesilaos Stavrou 39e2c01cc0
Tweak modus-operandi-tritanopia slate value 2025-10-30 07:28:20 +02:00
Protesilaos Stavrou 19b21a3876
Add support for Emacs Lisp semantic highlighting (Emacs 31)
Thanks to Eshel Yaron, the author of this feature, for (i) asking me
to add theme support and (ii) helping me understand the intended use
of semantic highlighting.

This was done in Emacs bug 79677 and on the emacs-devel mailing list:

- <https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-10/msg01156.html>.
- <https://lists.gnu.org/archive/html/emacs-devel/2025-10/msg00728.html>.
2025-10-30 06:50:24 +02:00
Protesilaos Stavrou 1eb95eac3c
Tweak the modus-vivendi-tinted variable use mapping 2025-10-30 06:37:35 +02:00
Protesilaos Stavrou 71ba12c4d7
Tweak the modus-operandi-tritanopia variable use mapping 2025-10-30 06:37:21 +02:00
Protesilaos Stavrou db6c6b5e97
Tweak the modus-operandi-tritanopia function call mapping 2025-10-30 06:37:06 +02:00
Protesilaos Stavrou f4ada31861
Tweak the modus-operandi-deuteranopia function call mapping 2025-10-30 06:36:41 +02:00
Protesilaos Stavrou 60b99c1a7c
Make eglot-highlight-symbol-face more subtle 2025-10-30 06:35:57 +02:00
Protesilaos Stavrou 388f92e2d7
Make modus-vivendi-tinted rust a bit more orange 2025-10-30 05:41:25 +02:00
Protesilaos Stavrou e5f23ca184
Make all light variants of gold and olive a bit more dark 2025-10-30 05:41:20 +02:00
Protesilaos Stavrou effaf91b9c
Tweak modus-vivendi-tinted fg-sage value 2025-10-29 21:20:22 +02:00
Protesilaos Stavrou b15e40987f
Tweak modus-vivendi fg-ochre value 2025-10-29 21:19:58 +02:00
Protesilaos Stavrou 2dbcc8f903
Support font-lock-function-call-face and font-lock-variable-use-face with bespoke mappings 2025-10-29 21:19:02 +02:00
Protesilaos Stavrou 8b4e9d9ccd
Make forge-topic-unread and gnus-summary-high-read unconditionally bold
This is the intended style. I made a mistake to use modus-themes-bold.
2025-10-29 09:20:01 +02:00
Protesilaos Stavrou 33a8ca40b5
Make elfeed-search-unread-title-face always be bold
It needs it. More generally, we have this style for "unread" items in
mu4e and notmuch.
2025-10-29 09:17:07 +02:00
Protesilaos Stavrou c4b5b27ad1
Remove an old make-obsolete-variable 2025-10-29 06:44:30 +02:00
Protesilaos Stavrou 9fc269c0a6
Sort all the define-obsolete-face-alias we have for the new version 2025-10-29 06:43:09 +02:00
Protesilaos Stavrou 94878dbd9c
Move modus-themes-completion-selected closer to its related faces 2025-10-29 06:42:29 +02:00
Protesilaos Stavrou 4f707d9a53
Deprecate "key binding" face we define
This was the old way of doing things before we had the semantic
palette overrides. Back then it made sense to have a face and then
inherit it, otherwise it was impossible to track was "means" what.
2025-10-29 06:40:12 +02:00
Protesilaos Stavrou 85101fb4ab
Deprecate all the "prominent error" faces we define
This was the old way of doing things before we had the semantic
palette overrides. Back then it made sense to have a face and then
inherit it, otherwise it was impossible to track was "means" what.
2025-10-29 06:40:12 +02:00
Protesilaos Stavrou 8f39cafdda fixup! Deprecate all the "mark" faces we define 2025-10-29 06:30:00 +02:00
Protesilaos Stavrou fce1a5e835
Remove the declaration of faces that are already obsolete 2025-10-29 06:29:25 +02:00
Protesilaos Stavrou d90dffe3cf
Deprecate all the "prose markup" faces we define
This was the old way of doing things before we had the semantic
palette overrides. Back then it made sense to have a face and then
inherit it, otherwise it was impossible to track was "means" what.
2025-10-29 06:18:26 +02:00
Protesilaos Stavrou d25d0318ad
Deprecate all the "mark" faces we define
This was the old way of doing things before we had the semantic
palette overrides. Back then it made sense to have a face and then
inherit it, otherwise it was impossible to track was "means" what.
2025-10-29 06:14:40 +02:00
Protesilaos Stavrou 589b49cea0
Deprecate all the "lang error" faces we define
This was the old way of doing things before we had the semantic
palette overrides. Back then it made sense to have a face and then
inherit it, otherwise it was impossible to track was "means" what.
2025-10-29 05:57:25 +02:00
Protesilaos Stavrou 7183244783
Deprecate all the "search rx" faces we define
This was the old way of doing things before we had the semantic
palette overrides. Back then it made sense to have a face and then
inherit it, otherwise it was impossible to track was "means" what.
2025-10-29 05:54:40 +02:00
Protesilaos Stavrou f8514d5e15
Deprecate all the "search" faces we define
This was the old way of doing things before we had the semantic
palette overrides. Back then it made sense to have a face and then
inherit it, otherwise it was impossible to track was "means" what.
2025-10-29 05:51:34 +02:00
Protesilaos Stavrou 8803f696cd
Update the Commentary of all the files 2025-10-29 05:43:01 +02:00
Protesilaos Stavrou 647f117506
Add FIXME to autoload the theme palettes
There has to be a way. I feel I am missing some detail.
2025-10-29 05:38:19 +02:00
Protesilaos Stavrou f7ac5a6aa0
Tweak the fg-alt value of modus-themes-operandi-tritanopia-palette 2025-10-27 07:28:09 +02:00
Protesilaos Stavrou ae80e32ea7
Deprecate all remaining colour-specific faces that we define
These should be replaced with semantic palette mappings. But I can do
that for version 5.1.0. Right now, I am interested in the groundwork.
2025-10-26 10:10:17 +02:00
Protesilaos Stavrou e6463c0e21
Reinstate the generic typography faces
This is to ensure that we do not get unwanted styles in some cases, as
reported by chainedghost in issue 167:
<https://github.com/protesilaos/modus-themes/issues/167>.
2025-10-26 07:14:10 +02:00
Kevin Fleming c681422305
Add missing parentheses on proced faces 2025-10-25 18:44:58 +01:00
Protesilaos Stavrou f6fe42f046
Use the 'comment' mapping instead of 'fg-dim' for three more comment-related faces 2025-10-25 16:32:38 +03:00
Protesilaos Stavrou a8d8332398
Set the missing foreground for the Git commit/rebase comment headers
This fixes a regression that was introduced by commit 08820b2.
2025-10-25 16:30:10 +03:00
Protesilaos Stavrou 493bd7a243
Fix broken parentheses 2025-10-25 10:56:12 +03:00
Protesilaos Stavrou 08820b2599
BREAKING Be much more conservative with :inherit
This is related to Emacs bug#79672: <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79672>.

What I did was to review ALL the uses of :inherit and try to do the
following:

- Limit recursive inheritence.
- Inherit from Modus faces.
- Do not inherit when semantic palette mappings can be used directly.

There are some exceptions, but the idea is to rely less on :inherit
and more on the palette entries we provide. This is anyway good for
us: I needed to make this change since I introduce the semantic
palette mappings.

In the process of doing this I also reviewed lots of faces. I might
have made some mistakes, but things are looking good overall.
2025-10-25 08:30:08 +03:00
Protesilaos Stavrou 0a2c7b84b1
Make the escape-glyph use a more appropriate semantic colour mapping
Also make it bold if modus-themes-bold-constructs is non-nil.
2025-10-25 06:48:47 +03:00
Protesilaos Stavrou 6eac188782
Stop configuring default typography faces
Their original values are fine and we may run into unexpected problems
by limiting them to a subset of supported display specifications (via
the ,c we have there).
2025-10-25 06:46:14 +03:00
Protesilaos Stavrou 574587f56b
Stop configuring rcirc-color and make obsolete the relevant faces
We defined the faces just for this case. I think the package should
accept a vector with colour values, like regular rcirc does with the
'rcirc-color-codes'. Then we can check back again.
2025-10-25 05:30:22 +03:00
Protesilaos Stavrou 233571e577
Improve the obsolesence warning for 'modus-themes-custom-auto-reload'
Thanks to Stefan Monnier for suggesting this format on the emacs-devel
mailing list: <https://lists.gnu.org/archive/html/emacs-devel/2025-10/msg00603.html>.
2025-10-24 08:23:18 +03:00
Protesilaos Stavrou a1ad1e5ef7
Remove support for the external tree-sitter package
We have the functionality built into Emacs now. Those who care enough
about this technology are probably using a version of Emacs that
supports it.
2025-10-24 07:02:23 +03:00
Protesilaos Stavrou 0482eab0f4
Use more generic colours for debbugs faces to work with all our themes
Otherwise the deuteranopia and tritanopia themes are not doing the
right thing.
2025-10-24 06:49:09 +03:00
Protesilaos Stavrou 6b2053b4ae
Remove support for indium package
From what I can tell, it is basically irrelevant for modern JS developers.
2025-10-24 06:43:38 +03:00
Protesilaos Stavrou 3ac449fb45
Remove dirty hack with the highlight-regexp faces
Yes, the :inverse-video preserves the background but it can make the
foreground unreadable. I think it is better to let hl-line-mode take
priority in this case. Maybe the alternative is to modify the overlay
'priority' property of those highlights, but this is not the theme's
prerogative.
2025-10-24 06:33:58 +03:00
Protesilaos Stavrou 407bf5e510
Make sure the org-habit faces always use a readable foreground
These faces are problematic because their colour coded background is
their essential quality. Having "readable" text here may be well below
the 7:1 contrast target. We have to do this otherwise we will need to
compromise on the background values, which makes them harder to tell
apart and thus less useful for what they are meant to do.
2025-10-24 06:13:06 +03:00
Protesilaos Stavrou b2e6d78d5f
Remove support for enh-ruby-mode (enhanced-ruby-mode)
I expect everyone to be using LSP by now.
2025-10-24 06:03:13 +03:00
Protesilaos Stavrou 902a601c08
Stop supporting agda2-mode
We are trying to fix something that should be handled directly in that
package, namely, for it to just inherit from font-lock instead of
trying to do its own thing.
2025-10-24 05:58:41 +03:00
Protesilaos Stavrou b741887a87
Make sure palette preview shows the mapping's value
Thanks to shimeike for reporting the problem in issue 163:
<https://github.com/protesilaos/modus-themes/issues/163>.
2025-10-23 11:53:41 +03:00
Protesilaos Stavrou a8325500bc
Add commands to mark, unmark, and copy entries in modus-themes-list-colors buffer 2025-10-23 07:30:42 +03:00
Protesilaos Stavrou 0ef42d8a92
Make stylistic changes to modus-themes--list-colors-tabulated 2025-10-23 06:44:33 +03:00
Protesilaos Stavrou 3b47b64a38
Reword the obsolescence warning about modus-themes-custom-auto-reload 2025-10-23 06:33:17 +03:00
Protesilaos Stavrou 41074f39a2
Make sure we activate themes only once 2025-10-23 06:22:27 +03:00
Protesilaos Stavrou a6db89ac18
Make sure the 'modus-themes-theme' reads the updated palette value
Otherwise palette overrides do not work intended. This was a
regression caused by commit 085ee06.

Thanks to chainedghost for reporting the bug in issue 161:
<https://github.com/protesilaos/modus-themes/issues/161>.
2025-10-21 08:25:16 +03:00
Protesilaos Stavrou f55db96b09
Make the modus-themes-common-palette-overrides apply also to derivative themes 2025-10-20 16:15:32 +03:00
Protesilaos Stavrou 085ee06c57
Make the modus-themes-theme a defun instead of a defmacro
I have been facing issues with the macro where certain palette entries
are not known at compile time. I want to experiment with the defun, as
it is always going to be called at runtime.
2025-10-20 07:26:37 +03:00
Frédéric Giquel 1099f8a20d Make markdown-code-face consistent with org-block 2025-10-19 09:26:22 +02:00
Protesilaos Stavrou d8a80e52d1
Revert "Make the modus-themes-common-palette-mappings a defvar instead of defconst"
This reverts commit 02b4027555.

It turns out that this does not fix the problem. If so, I prefer to
declare this as a 'defconst'.
2025-10-13 08:12:46 +03:00
Protesilaos Stavrou 02b4027555
Make the modus-themes-common-palette-mappings a defvar instead of defconst
I have had this issue for a while where loading the .elc version of
the themes would result in nil values for the mappings defined in the
modus-themes-common-palette-mappings. I tried a few things and it
seems that this is enough to make things work as expect, i.e. to have
the list reified at compile time so that the individual theme palettes
get all the mappings correctly.
2025-10-12 08:32:00 +03:00
Protesilaos Stavrou 8582e487a4
Remove two duplicate mappings 2025-10-12 07:51:18 +03:00
Protesilaos Stavrou 9ef5731b5b
Remove duplicate entries of palette mappings for buttons 2025-10-12 07:44:41 +03:00
Protesilaos Stavrou f186a4e0af
Make header-line-inactive inherit header-line 2025-10-12 07:21:06 +03:00
Protesilaos Stavrou cae9e08865
Include a doc string in the output of modus-themes-define-derivative-command 2025-10-11 20:36:06 +03:00
Protesilaos Stavrou a391efc0f8
Remove hardcoded colour values from some Magit faces 2025-10-10 07:47:06 +03:00
Protesilaos Stavrou 99eb9d4c9a
Make widget-field use appropriate colour mappings and have an underline 2025-10-10 07:08:46 +03:00
Protesilaos Stavrou cfa3545171
Make modus-themes-custom-auto-reload obsolete 2025-10-07 07:15:06 +03:00
Protesilaos Stavrou 933a926247
Provide the macro modus-themes-define-derivative-command for derivative themes 2025-10-06 07:29:35 +03:00
suboyar 8c4684325e Remove redundant theme name argument from modus-themes-declare call
The function doesn't accept this parameter and constructs it internally.
2025-10-05 16:04:43 +02:00
Protesilaos Stavrou 91cd9dfed3
Make the match face use its own mapping 2025-10-04 07:59:17 +03:00
Protesilaos Stavrou 0648760267
Revert "Add an 'eval-and-compile' around all palette variables"
This reverts commit 7111708f15.

I thought this was needed to fix a warning I get about 'nil'
foreground value for a couple of faces. It seems that the mappings in
'modus-themes-common-palette-mappings' are not read and so I suspected
this was because of them not being known at compile time. Apparently,
this does not fix the problem, so I must check elsewhere...
2025-10-03 10:49:41 +03:00
Protesilaos Stavrou e942399a16
Add docstring for the method modus-themes-get-themes 2025-10-03 10:42:31 +03:00
Protesilaos Stavrou 7111708f15
Add an 'eval-and-compile' around all palette variables
I believe we need this because the individual theme files have the same.
2025-10-03 10:37:45 +03:00
Protesilaos Stavrou efbedafcbb
Remove the duplicate mappings for date-now 2025-10-03 10:36:42 +03:00
Protesilaos Stavrou c05e5a0433
Expand the modus-themes-theme macro to accept optional faces and custom variables 2025-10-03 07:36:45 +03:00
Protesilaos Stavrou 3e091098f0
Add back the missing annotation function
I must have deleted it as part of that botched rebase I did. Anyway,
this sort of thing will not even be visible to users of the marginalia
package, but is still good to have.
2025-10-02 19:57:40 +03:00
Protesilaos Stavrou 64681aadf5
Make 5.0.0 our current development target 2025-10-01 18:29:09 +03:00
Protesilaos Stavrou eac296eb1d
Use modus-themes-sort in the method of modus-themes-include-derivatives-mode 2025-10-01 07:52:33 +03:00
Protesilaos Stavrou e8f99ba7d7
Mention modus-themes-sort in modus-themes-get-all-known-themes 2025-10-01 07:52:32 +03:00
Protesilaos Stavrou 1d71c7d942
Use modus-themes-sort in the generic modus-themes-get-themes 2025-10-01 07:52:32 +03:00
Protesilaos Stavrou 49d435ee79
Implement a modus-themes-sort function 2025-10-01 07:52:32 +03:00
Protesilaos Stavrou 154f876545
Redo the helper to check for background and adapt modus-themes-filter-by-background-mode 2025-10-01 07:52:32 +03:00
Protesilaos Stavrou 36decff7c2
Se the modus-themes-to-rotate nil and allow default rotation through modus-themes-get-themes 2025-10-01 07:52:32 +03:00
Protesilaos Stavrou 52f8e110bb
Make small stylistic refinements 2025-10-01 07:52:32 +03:00
Protesilaos Stavrou 97966a3502
Include the frame-background-mode in the theme macro 2025-10-01 07:52:32 +03:00
Protesilaos Stavrou 5f6ac4b130
Make the git-commit branches less intense
They do not need to stand out as much.
2025-09-30 12:21:48 +03:00
Protesilaos Stavrou 01f683346f
Make modus-themes-rotate prompt for a theme if it cannot rotate there
This is better for us because then we do not need to have derivative
theme packages necessarily implement their own version of
'modus-themes-to-rotate'. Plus, the user may have forgotten to update
that user option.
2025-09-30 12:14:33 +03:00
Protesilaos Stavrou 86112e457a
Use the correct value for our modus-themes-get-themes method 2025-09-30 07:38:52 +03:00
Protesilaos Stavrou 63ba534f1a
Reword the documentation string of modus-themes-get-themes 2025-09-30 07:05:24 +03:00
Protesilaos Stavrou b20d38115b
Reformat the palette variables and introduce some shared mappings 2025-09-29 23:27:26 +03:00
Protesilaos Stavrou b73415fda1
Use generic comments for inside the palettes 2025-09-29 22:56:06 +03:00
Protesilaos Stavrou d6b387f6ad
Make stylistic change to the theme obsolete aliases 2025-09-29 22:35:43 +03:00
Protesilaos Stavrou bea8a0436e
Tweak the modus-themes--activate 2025-09-29 22:32:03 +03:00
Protesilaos Stavrou 4c01c5e479
Again, fix things from the clumsy rebase... 2025-09-29 22:23:40 +03:00
Protesilaos Stavrou 27558488ef
Change how themes are activated and fix known issues with modus-themes-get-theme-palette 2025-09-29 22:10:53 +03:00
Protesilaos Stavrou c2016385f9
Reinstate a change that I messed up with the botched rebase 2025-09-29 21:34:54 +03:00
Protesilaos Stavrou 566c1ba4ca
Add missing change from 8557c39 2025-09-29 20:26:20 +03:00
Protesilaos Stavrou 8557c39298
Add FIXME for modus-themes-get-theme-palette overrides 2025-09-29 20:24:51 +03:00
Protesilaos Stavrou 0739ea4406
I messed up the rebase and had to redo things...
Hopefully I did not miss something and broke stuff.
2025-09-29 20:19:51 +03:00
Protesilaos Stavrou ecf3698412
Tweak how 'unspecified looks in the modus-themes-list-colors 2025-09-29 20:02:11 +03:00
Protesilaos Stavrou 711b9c1454
Make sure modus-themes-list-colors loads its theme to avoid errors 2025-09-29 20:02:11 +03:00
Protesilaos Stavrou 5b7cd71019
Name the modus-themes-get-theme-palette overrides parameter correctly
I got it wrong the first time.
2025-09-29 20:02:07 +03:00
Protesilaos Stavrou f8881652d3
Fix the feature of custom-declare-theme that we pass 2025-09-29 20:01:56 +03:00
Protesilaos Stavrou 0bd89da8ae
Keep modus-themes-include-derivatives-mode disabled by default 2025-09-29 20:01:56 +03:00
Protesilaos Stavrou d9adb13ebc
Make sure a theme is registered only if it is not a Modus theme 2025-09-29 20:01:56 +03:00
Protesilaos Stavrou 5a335389b1
Declare all the Modus themes at the outset to speed things up 2025-09-29 20:01:56 +03:00
Protesilaos Stavrou 636a19a28b
Rename the minor mode to modus-themes-include-derivatives-mode
This is more self-evident.
2025-09-29 20:01:56 +03:00
Protesilaos Stavrou e5f0a31f92
Fall back to -1 instead of 0 in modus-themes-rotate-subr
Thanks to Grant Rosson for pointing this out in issue 60 on the
ef-themes repository: <https://github.com/protesilaos/ef-themes/issues/60#issuecomment-3346124052>.
2025-09-29 20:01:56 +03:00
Protesilaos Stavrou ee104f0f16
Make the theme declaration and registration their own functions 2025-09-29 20:01:56 +03:00
Protesilaos Stavrou 97c23e87d8
Require cl-lib at compile time for cl-defgeneric and cl-defmethod
I think we do not need this for newer versions of Emacs, but it does
no harm, anyway.
2025-09-29 20:01:56 +03:00
Protesilaos Stavrou 4c245ba030
Remove the :before from the defmethod because it is not right
I had it for the Modus equivalent as well...
2025-09-29 20:01:56 +03:00
Protesilaos Stavrou 4a7ff08327
Remove superfluous colon symbol from modus-themes-list-colors 2025-09-29 20:01:56 +03:00
Protesilaos Stavrou d945f1c1aa
Make modus-themes-rotate-subr more robust 2025-09-29 20:01:55 +03:00
Protesilaos Stavrou 8317ad8d50
Instead of reinventing THEMES filters, use defmethods instead 2025-09-29 20:01:54 +03:00
Protesilaos Stavrou bb5a91f9c1
Make the modus-themes-rotate-subr start from 0 if no other position is available
We still want to perform a rotation when the current theme is not on
the modus-themes-to-rotate. This is done in response to issue 60 on
the ef-themes repository (but applies to use here too, more so since I
am redesigning the ef-themes to be derived from the modus-themes):
<https://github.com/protesilaos/ef-themes/issues/60>.
2025-09-29 20:01:10 +03:00
Protesilaos Stavrou f3ca643038
Make small rewording in a doc string 2025-09-29 20:01:10 +03:00
Protesilaos Stavrou 741486b03c
Rewrite modus-themes-get-all-known-themes to not assume nil family as Modus
It is easier to give it a family when we need to, else to accept all
the themes.
2025-09-29 20:01:10 +03:00
Protesilaos Stavrou 102650a412
Rename the helper for modus-themes-rotate for consistency with the load random approach 2025-09-29 20:01:08 +03:00
Protesilaos Stavrou bdd3470622
Make modus-themes-load-theme accept an optional hook argument 2025-09-29 20:00:50 +03:00
Protesilaos Stavrou a91870a447
Make the load theme helpers easier to work with 2025-09-29 20:00:50 +03:00
Protesilaos Stavrou 076709b769
Define a subroutine for modus-themes-load-random
This makes it easier to reuse the code while building on top of the modus-themes.
2025-09-29 20:00:49 +03:00
Protesilaos Stavrou 08ed0d631c
Make modus-themes-get-all-known-themes filter by theme family
This is more flexible than having a no derivatives toggle.
2025-09-29 20:00:49 +03:00
Protesilaos Stavrou 91b9b3f9ae
Move the theme palettes out of their respective files into modus-themes.el
This way any other package can build on top of Modus without having to
load any of those themes.
2025-09-29 20:00:44 +03:00
Protesilaos Stavrou f52e2f16b0
Define commands to load a random theme, plus necessary helper functions 2025-09-29 19:58:43 +03:00
Protesilaos Stavrou 7a76dca731
Use seq-union in modus-themes-get-all-known-themes
Looks nicer than (delete-dups (append ...)) plus it sound more right.
2025-09-29 19:58:43 +03:00
Protesilaos Stavrou 76fe11a79c
Define helper function to activate a theme and simplify modus-themes-get-all-known-themes 2025-09-29 19:58:43 +03:00
Protesilaos Stavrou e84e1a7b0b
Make sure the common overrides are accounted for in the theme's scope 2025-09-29 19:58:43 +03:00
Protesilaos Stavrou 95dde90c84
Reorder the forms in the macro to put the let closer to where it is needed 2025-09-29 19:58:39 +03:00
Protesilaos Stavrou 161391ba67
Rebase theme redesign on top of main 2025-09-29 19:57:32 +03:00
Protesilaos Stavrou 6f0e64daaa
Revert "Make modus-themes--current-theme only return an active theme (Emacs bug#79504)"
This reverts commit 76ea634816.
2025-09-28 20:16:35 +03:00
Protesilaos Stavrou 6d590469e5
Revert "Make the modus-themes-select-prompt public and extend it to be used by others"
This reverts commit 6cc997945f.
2025-09-28 20:16:34 +03:00
Protesilaos Stavrou e6df63dacd
Revert "Deprecate modus-themes-custom-auto-reload"
This reverts commit e32af5e54d.
2025-09-28 20:16:33 +03:00
Protesilaos Stavrou c56c1a3cf0
Revert "Remove outdated comment from one user option"
This reverts commit d13e9a8bd9.
2025-09-28 20:16:32 +03:00
Protesilaos Stavrou d0a4d673ee
Revert "Redefine how themes are registered (the macro) and retrieved"
This reverts commit 6be21f1119.
2025-09-28 20:16:31 +03:00
Protesilaos Stavrou cf88cc5b13
Revert "Tweak how the modus-themes-toggle is done"
This reverts commit c9fa2b8d83.
2025-09-28 20:16:30 +03:00
Protesilaos Stavrou 69d949fb27
Revert "Tweak how the modus-themes-rotate is done"
This reverts commit abb41f9836.
2025-09-28 20:16:29 +03:00
Protesilaos Stavrou 87c7fa3e4b
Revert "Make sure palette 'append' happens in the correct order"
This reverts commit e33c037359.
2025-09-28 20:16:28 +03:00
Protesilaos Stavrou 4a7f7b18b3
Revert "Make modus-themes-get-theme-palette append symbol values and accept overrides only"
This reverts commit 264814f51e.
2025-09-28 20:16:26 +03:00
Protesilaos Stavrou 7b7cc02f1c
Revert "Make tweaks based on new modus-themes-get-theme-palette (per commit 264814f)"
This reverts commit 753cdab306.
2025-09-28 20:16:21 +03:00
Protesilaos Stavrou 753cdab306
Make tweaks based on new modus-themes-get-theme-palette (per commit 264814f) 2025-09-28 15:52:59 +03:00
Protesilaos Stavrou 264814f51e
Make modus-themes-get-theme-palette append symbol values and accept overrides only 2025-09-28 15:51:41 +03:00
Protesilaos Stavrou e33c037359
Make sure palette 'append' happens in the correct order
Otherwise, the overrides never work.
2025-09-28 11:32:44 +03:00
Protesilaos Stavrou abb41f9836
Tweak how the modus-themes-rotate is done 2025-09-28 10:48:18 +03:00
Protesilaos Stavrou c9fa2b8d83
Tweak how the modus-themes-toggle is done 2025-09-28 10:46:24 +03:00
Protesilaos Stavrou 6be21f1119
Redefine how themes are registered (the macro) and retrieved 2025-09-28 10:43:02 +03:00
Protesilaos Stavrou d13e9a8bd9
Remove outdated comment from one user option 2025-09-28 08:36:27 +03:00
Protesilaos Stavrou e32af5e54d
Deprecate modus-themes-custom-auto-reload
It complicates things for us and also has the disadvantage of running
as many times as the setopt variables being set. Users should just
learn to reload their theme and/or Emacs should have some built-in
mechanism. This is not our problem to fix.
2025-09-28 08:34:05 +03:00
Protesilaos Stavrou 6cc997945f
Make the modus-themes-select-prompt public and extend it to be used by others
The plan is to empower other themes to use this with whatever little
glue code they need.
2025-09-27 11:23:48 +03:00
Protesilaos Stavrou 76ea634816
Make modus-themes--current-theme only return an active theme (Emacs bug#79504)
Otherwise we end up loading the first among the "known themes" even
when the user had no such intention.

Thanks to Zhengyi Fu for reporting the bug on the Emacs tracker.
2025-09-27 11:22:01 +03:00
Protesilaos Stavrou 2c4e1dc7ce
Add support for minibuffer-nonselected
I tried many styles, but because the minibuffer colours are
customisable we cannot know if, say, "red background" is going to look
different than what the user has set. The colour inversion is not the
prettiest in this case, but works well.
2025-09-23 12:42:43 +03:00
Protesilaos Stavrou 7c5eed1cda
Refine the Custom buttons (also see commit 58d1b88) 2025-09-20 14:02:37 +03:00
Protesilaos Stavrou 58d1b88c1d
Refine the modus-themes-button style 2025-09-20 14:00:31 +03:00
Protesilaos Stavrou 161792b1b0
Make org-date-selected inherit calendar-today 2025-09-09 09:55:33 +03:00
Protesilaos Stavrou 92109f871b
Make calendar-today easier to spot 2025-09-09 09:55:14 +03:00
Protesilaos Stavrou 5d474cd524
Make the mode line faces use an underline if :box is not supported 2025-09-03 07:52:36 +03:00
Protesilaos Stavrou e9c612c6c0
Make the notmuch-message-summary-face use an overline if possible 2025-09-03 07:47:57 +03:00
Protesilaos Stavrou c40225e6d9
Add support for the magit-section-secondary-heading
It uses ':weight bold' whereas we want ':inherit bold'. The latter
gives users the option to modify the font family of the 'bold' face,
such as to make it extrabold.
2025-09-03 07:44:52 +03:00
Protesilaos Stavrou b55d84a5cb
Explicitly cover the tab-bar-tab-highlight face
This is because its style was changed in Emacs 31 and now we do not
get what we used to have.
2025-07-12 07:43:49 +03:00
Protesilaos Stavrou 2f19a51511
Bump version number to trigger GNU ELPA package update
I do not want to publish a new minor release because I did that
recently and there are not many changes since then. Plus, I would need
to prepare a change log, which I cannot do right now.

Rebuilding the package allows us to include commit bf6c6ce, which
lowers the minimum required version of Emacs to 27.1. Hopefully,
everything will work as intended.

This is in response to bug#78991 by John Sullivan:
<https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-07/msg00480.html>.
2025-07-10 20:13:07 +03:00
Protesilaos Stavrou bf6c6ce67a
Remove use of 'string-pad' so we can depend on Emacs 27.1
This is in response to bug#78991 by John Sullivan:
<https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-07/msg00480.html>.
2025-07-10 20:08:32 +03:00
Eric Ottosson 7601df769e Fix flymake-warning-echo-at-eol face 2025-07-09 21:27:21 +02:00
Protesilaos Stavrou 6639604271
Make stylistic tweaks to the lsp faces
Those were originally contributed by Jimmy Yuen Ho Wong in pull
request 142: <https://github.com/protesilaos/modus-themes/pull/142>.

The changes I making are intended mostly to avoid hardcoding certain
values, so that the palette overrides we provide work as expected.
2025-07-07 20:14:48 +03:00
Protesilaos Stavrou d31def4f58
Merge pull request #142 from wyuenho/lsp
Add lsp-mode and lsp-ui faces
2025-07-07 19:59:56 +03:00
Jimmy Yuen Ho Wong ebefa010b2
Add lsp-mode and lsp-ui faces 2025-06-25 16:44:18 +01:00
Gautier Ponsinet 3550360e88
Add support for new package faces (Emacs 31) 2025-06-23 07:28:30 +03:00
Protesilaos Stavrou fd5800c395
Add support for hs-ellipsis face (Emacs 31) 2025-06-17 13:34:38 +03:00
Protesilaos Stavrou 6636c91b88
Add support for the new spacious-padding face names
I keep the old ones for the time being, but they will be removed eventually.
2025-06-16 07:35:05 +03:00
Protesilaos Stavrou b7aa3ae780
Update modus-themes to version 4.8.0 2025-06-11 07:57:33 +03:00
Protesilaos Stavrou 6979a37a1e
Add support for the header-line-inactive face (Emacs 31) 2025-06-10 09:40:40 +03:00
Jacob S. Gordon 21b77de155
Reverse theme rotation direction when called with a prefix
When calling modus-themes-rotate interactively and with a prefix
argument, reverse the sense of rotation from right to left among the
modus-themes-to-rotate.  Explicit calls to modus-themes-rotate can
pass a non-nil REVERSE argument to achieve the same for their THEMES.

* modus-themes.el: (modus-themes-rotate, modus-themes--rotate-p,
modus-themes--rotate, modus-themes--next-in-rotation):

Add an optional REVERSE argument to modus-themes-rotate.  When called
interactively this becomes the current prefix argument.  Replace
helper functions with a single modus-themes--next-in-rotation.  Update
doc strings.
2025-05-27 10:56:39 +03:00
Protesilaos Stavrou 01b78e587d
Add missing command in the doc string of modus-themes-after-load-theme-hook 2025-05-24 11:30:31 +03:00
Protesilaos Stavrou af00e1c019
Clarify the doc string of modus-themes-after-load-theme-hook 2025-05-24 11:28:13 +03:00
Protesilaos Stavrou 6880f3a7d9
Suppress spurious warning about kmacro-menu-mark face 2025-05-19 09:04:59 +03:00
Protesilaos Stavrou 847311bf74
Make "ancient" Gnus look like a regular "read" message
This is in response to the issue 119 by sivaramn: <https://github.com/protesilaos/modus-themes/issues/119>.
In the original Gnus faces, the "ancient" are not the same as "read"
in terms of their colour, though I cannot find what the difference
actually is. It seems to me that "ancient" simply means "read it before".
2025-04-28 07:56:22 +03:00
Protesilaos Stavrou 93e89bdcf8
Add support for some tmr faces 2025-04-26 07:35:08 +03:00