Commit graph

2729 commits

Author SHA1 Message Date
Protesilaos Stavrou f430f287bd
Write macro to express tests how I want them 2026-04-10 16:24:38 +03:00
Protesilaos Stavrou ec4c79c472
Write test for modus-themes--background-p 2026-04-10 15:59:50 +03:00
Protesilaos Stavrou 087b419503
Write a test for modus-themes--belongs-to-family-p 2026-04-10 15:57:36 +03:00
Protesilaos Stavrou d76bbf9865
Write test for modus-themes--belongs-to-family-p 2026-04-10 15:55:31 +03:00
Protesilaos Stavrou dce91510b3
Write test for modus-themes-activate 2026-04-10 15:37:29 +03:00
Protesilaos Stavrou df74b73a60
Write a test for modus-themes--color-eight-to-six-digits and use its name instead of the older symbol 2026-04-10 14:58:24 +03:00
Protesilaos Stavrou 282dbd66b5
Improve modus-themes-adjust-value and write a test for it 2026-04-10 14:58:06 +03:00
Protesilaos Stavrou b31966fe65
Change name of ancillary function to be more precise and refine its implementation 2026-04-10 14:57:36 +03:00
Protesilaos Stavrou c63be80d3b
Refine modus-themes-contrast and write a test for it 2026-04-10 14:48:51 +03:00
Protesilaos Stavrou 953ec93841
Refine modus-themes-wcag-formula and write a test for it 2026-04-10 14:48:14 +03:00
Protesilaos Stavrou f062c8d99a
Write a test for modus-themes--hex-to-rgb 2026-04-10 14:21:18 +03:00
Protesilaos Stavrou a134889772
Add missing parenthesis to a doc string 2026-04-10 14:16:29 +03:00
Protesilaos Stavrou 2e19f038c3
Update the modus-themes--hex-to-rgb doc string 2026-04-10 14:03:51 +03:00
Protesilaos Stavrou 6fa9f61f48
Fix current year in modus-themes-test.el 2026-04-10 12:55:59 +03:00
Protesilaos Stavrou dbd67e1140
Update the modus-themes-test.el copyright years 2026-04-10 12:49:08 +03:00
Protesilaos Stavrou 937ee8047b
Make stylistic change to modus-themes--hex-to-rgb 2026-04-10 12:45:32 +03:00
Protesilaos Stavrou 7d234fd65f
Make blink-matching-paren-offscreen the same as show-paren-match
Thanks to Troy Brown for suggesting this change in issue 209:
<https://github.com/protesilaos/modus-themes/issues/209>.
2026-04-05 21:15:09 +03:00
Protesilaos Stavrou b07a5d5001
Reinstate 'provide' in all theme files
I thought this was not needed, but Ihor Radchenko showed me a useful
example. This was done in issue 207: <https://github.com/protesilaos/modus-themes/issues/207>.
2026-04-05 16:33:11 +03:00
Protesilaos Stavrou 9492b9e3fa
Mention modus-themes.nvim in the README.md
A project by @miikanissi.
2026-04-05 16:26:38 +03:00
Protesilaos Stavrou 0a6f5d33a3
Mention zed-modus-themes in the README.md
A project by @vitallium.
2026-04-05 16:24:20 +03:00
Protesilaos Stavrou d763988f80
Mention hugo-modus in the README.md
I am putting it here instead of the manual. The latter is synchronised
with emacs.git and I do not want to have any issues about mentioning
projects that may not be in line with GNU policy.
2026-04-05 16:16:54 +03:00
Protesilaos Stavrou 84528d1f3e
Refine the typst-ts-script-char-face to use bold conditionally
This is about the user option modus-themes-bold-constructs.
2026-04-05 15:53:21 +03:00
Protesilaos Stavrou 5e69da089a
Make font-latex-script-char-face look like escape-glyph 2026-04-05 15:52:37 +03:00
Protesilaos Stavrou bbb43a6f62
Add initial support for typst-ts-mode
Thanks to Pranshu Sharma for making this suggestion in issue 208:
<https://github.com/protesilaos/modus-themes/issues/208>.
2026-04-05 15:52:05 +03:00
Protesilaos Stavrou e0f42f2740
Extend support for my lin package faces 2026-03-25 10:09:07 +02:00
Protesilaos Stavrou e5fb7f2229
Update the manual's acknowledgements for commit 83501bc 2026-03-20 08:17:15 +02:00
Protesilaos Stavrou 83501bcd50
Correct the modus-themes-toggle behaviour to match its doc string
I want to prompt for a theme only if modus-themes-to-toggle is not
right.

Thanks Morten Kjeldgaard for bringing this matter to my attention in
issue 44 in the ef-themes repository (those are built on top of the
modus-themes): <https://github.com/protesilaos/ef-themes/issues/44>.
2026-03-20 08:15:02 +02:00
Protesilaos Stavrou 5e1621d638
Make the breadcrumb faces inherit from their base face
This way users can apply, say, a font height that carries over to all
the faces.

Thanks to baconabo for making this suggestion in issue 204:
<https://github.com/protesilaos/modus-themes/issues/204>.
2026-03-16 20:17:51 +02:00
Protesilaos Stavrou c865abc82d
Remove blank line 2026-03-15 21:48:02 +02:00
Protesilaos Stavrou 30cbfe27b5
Consolidate some colours in the modus-themes-common-palette-mappings 2026-03-15 21:47:09 +02:00
Protesilaos Stavrou 6beea7125e
Define new bg-popup named colour
This gives users and derivative themes the option to pick a suitable
value for those interfaces.

Thanks to aikrahguzar for making this suggestion in issue 70 of my
ef-themes repository (the ef-themes are built on top of the
modus-themes): <https://github.com/protesilaos/ef-themes/issues/70>.
2026-03-15 21:28:05 +02:00
Protesilaos Stavrou 100533ab0f
Remove background value from company-preview face
This makes it consistent with the style I am applying to the built-in
completion-preview-mode.
2026-03-15 21:28:02 +02:00
Protesilaos Stavrou a4264088b7
Make modus-themes-adjust-value return 6-digit colour 2026-03-14 10:57:29 +02:00
Protesilaos Stavrou ed36e34132
Bring back the modus-themes-adjust-value
Derivative themes may need it.
2026-03-08 21:43:54 +02:00
Protesilaos Stavrou cb20bbe83f
Remove needless comment 2026-03-08 21:30:46 +02:00
Protesilaos Stavrou 9d0226961d
Include the featurep check in modus-themes-theme
This is because our check involves this:

    (let ((theme-exists-p (get name 'theme-feature)) ...) ...)

Thanks to Daniel Colascione for informing me about this in issue 201:
<https://github.com/protesilaos/modus-themes/issues/201>.
2026-03-01 12:07:59 +02:00
Protesilaos Stavrou 789cb7ea32
Revert "Add back theme-autoload cookies to all theme files"
This reverts commit b2e0aff5ed.

It does not work as intended, as reported by Daniel Colascione in
issue 202: <https://github.com/protesilaos/modus-themes/issues/202>. I
will need to make a wider revision here.
2026-03-01 12:05:46 +02:00
Protesilaos Stavrou b45b0d8a7c
Only disable 'color-schemes' with modus-themes-disable-other-themes
This is because Emacs 31 comes with a "newcomer" theme that we do not
want to disable by mistake.
2026-02-22 08:43:39 +02:00
Protesilaos Stavrou ecd696daf8
Add support for my institution-calendar faces 2026-02-20 08:58:50 +02:00
Protesilaos Stavrou b2e0aff5ed
Add back theme-autoload cookies to all theme files
I tried to do this with a recent commit but that broke things because
I also included a deftheme declaration. Having that meant that
modus-themes-theme would not declare the theme with all its data,
including its palette.

I looked at loaddefs-generate--emacs-batch and it seems that having
just the theme-autoload line is enough.
2026-02-19 08:43:20 +02:00
Protesilaos Stavrou 1343ea9947
Revert "Reinstate the theme-autoload cookie with the deftheme in place"
This reverts commit 122d53333f.

The reason is that this breaks the package when trying to load a theme
at startup. This was reported by Eamonn Sullivan in issue 69 in the
ef-themes repository: <https://github.com/protesilaos/ef-themes/issues/69>.
2026-02-18 20:44:05 +02:00
Protesilaos Stavrou 122d53333f
Reinstate the theme-autoload cookie with the deftheme in place
We need this because otherwise the autolaods are not generated
properly, which can cause problems for other packages that need to
read the theme data.
2026-02-18 18:48:27 +02:00
Protesilaos Stavrou 127ed57f0e
Remove magit face that does not exist anymore 2026-02-17 09:26:40 +02:00
Protesilaos Stavrou 9dd3b9074b
Acknowledge Mike Olson for commit c475454
This is what allows the modus-themes to be loaded in the early-init.el
because they no longer depend on color-name-to-rgb to be available at
that time.

This change was done in pull request 199: <https://github.com/protesilaos/modus-themes/pull/199>.
It is within the ~15-line limit, meaning that Mike does not need to
assign copyright to the Free Software Foundation.
2026-02-17 09:15:57 +02:00
Protesilaos Stavrou 9af856fb38
Merge pull request #199 from mwolson/fix/color-values-display-independence
Use color-values-from-color-spec instead of color-name-to-rgb
2026-02-17 09:13:13 +02:00
Mike Olson c475454d87 Use color-values-from-color-spec instead of color-name-to-rgb
Replace `color-name-to-rgb' with a new internal helper
`modus-themes--hex-to-rgb' that uses `color-values-from-color-spec'
(a C built-in since Emacs 28.1) to parse hex RGB strings without
any display dependency.

This fixes a crash when loading a Modus theme during early-init.el
on GUI Emacs (e.g. macOS Homebrew emacs-plus), where
`color-name-to-rgb' fails because `color-values' returns nil before
the display is ready.

The fix applies to all three direct call sites:
- `modus-themes-wcag-formula' (the critical one, called during
  theme loading)
- `modus-themes-generate-color-blend'
- `modus-themes-color-warm-p'

Fixes #198.
2026-02-16 15:04:35 -05:00
Protesilaos Stavrou 0ace30e471
Write tests for dark colour and readable colour 2026-01-31 10:14:40 +02:00
Protesilaos Stavrou b633768b7c
Rewrite mtt-inheritance test to restore the current Modus theme 2026-01-31 10:13:45 +02:00
Protesilaos Stavrou ea135519d3
Revert to using a readable foreground for the org-habit faces
This relies on our own functions, which should be available even if
the theme is loaded via the early-init.el.

Thanks to Jacod "Jake" Gordon for reminding me to fix this and for
testing my prototype. It was done in issue 197:
<https://github.com/protesilaos/modus-themes/issues/197>.
2026-01-31 10:00:35 +02:00
Protesilaos Stavrou 27456c3121
Change modus-themes--list-colors-tabulated to use our own function for a readable foreground (commit 2c225b6) 2026-01-31 10:00:07 +02:00