Commit graph

2708 commits

Author SHA1 Message Date
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
Protesilaos Stavrou 2c225b634e
Define function to get readable foreground, based on our own "dark-p" (per commit 4ecefd9) 2026-01-31 09:59:34 +02:00
Protesilaos Stavrou 4ecefd924f
Implement our own "dark-p" which relies on our WCAG formula test
This way I can more easily reason about the return value.
2026-01-31 09:58:21 +02:00
Protesilaos Stavrou 4b4fd65336
Change the parameter name in a couple of places to suggest it is a hexadecimal RGB colour 2026-01-31 09:56:45 +02:00
Protesilaos Stavrou 39682cd87c
Make stylistic changes to the WCAG formula functions 2026-01-31 09:56:13 +02:00
Protesilaos Stavrou ba747a245f
Change the scroll-bar background to ensure better visibility 2026-01-25 08:59:38 +02:00
Protesilaos Stavrou 0f6ce4f8bb
Remove the box and background from the completion group titles and make them optionally italic 2026-01-24 10:18:37 +02:00
Protesilaos Stavrou c57f158886
Only use bold in org-list-dt
The reason is that the foreground overrides other foregrounds, such as
for ~code~ elements.
2026-01-23 09:32:51 +02:00
Protesilaos Stavrou 55be658ddf
Use a background and box for the completion groups 2026-01-21 08:55:00 +02:00
Protesilaos Stavrou 8a45a1393a
Tweak the format of the modus-themes-with-colors error message 2026-01-13 06:31:26 +02:00
Protesilaos Stavrou 4d9a19513d
Update the copyright years 2026-01-11 12:45:54 +02:00
Protesilaos Stavrou 192b2f612e
Go back to using a "success" colour for git commit summary lines
This is because it is the only colour that is guaranteed to contrast
with the warning and error colours we use for long lines and non-empty
second line.
2026-01-10 07:57:30 +02:00
Protesilaos Stavrou 0b6956a783
Be more strict about how to check for loaded theme
This is because typically themes have a 'provide-theme' in their file,
which we do not have in our theme files. Not doing a 'provide-theme'
at all times can break user configurations.

Thanks to Daniel Colascione for pointing this out in issue 195:
<https://github.com/protesilaos/modus-themes/issues/195>.
2026-01-10 07:51:08 +02:00
Protesilaos Stavrou 073e1d2488
Remove outdated comment 2026-01-09 07:11:35 +02:00
Protesilaos Stavrou afe5c14f30
Acknowledge Steven Allen for commit e22df92
This was done in pull request 194: <https://github.com/protesilaos/modus-themes/pull/194>.
Steven has assigned copyright to the Free Software Foundation.
2026-01-09 07:03:49 +02:00
Protesilaos Stavrou 8f05f03bc9
Merge pull request #194 from Stebalien/steb/fix-gradients
Lighten/darken colors in a specified direction instead of guessing
2026-01-09 07:01:09 +02:00
Steven Allen e22df9248c Lighten/darken colors in a specified direction instead of guessing
Previously, we'd sometimes specify a direction, but then we'd guess the
direction again `modus-themes-generate-gradient'. This commit removes
that guess and specifies the direction explicitly in all cases.

fixes https://github.com/protesilaos/ef-themes/issues/65
2026-01-08 09:48:03 -08:00
Protesilaos Stavrou be8111f267
Acknowledge ukiran03 for commit 7eeadab
This was done in pull request 193:
<https://github.com/protesilaos/modus-themes/pull/193>.

The change is small, meaning that ukiran03 does not need to assign
copyright to the Free Software Foundation.
2026-01-08 18:36:44 +02:00
Protesilaos Stavrou 7eeadab5d8
Merge pull request #193 from ukiran03/widget-field-underline
Set widget-field underline face to border color
2026-01-08 18:35:38 +02:00
Protesilaos Stavrou e438a2fcdc
Acknowledge JD Smith for commit e8dee25
This was done in pull request 191: <https://github.com/protesilaos/modus-themes/pull/191>.
2026-01-08 06:46:35 +02:00
Protesilaos Stavrou b38aaf265f
Merge pull request #191 from jdtsmith/with-colors-symbol-macrolet
Rewrite modus-themes-with-color to use cl-symbol-macrolet
2026-01-08 06:45:36 +02:00
ukiran03 f5df8edd15 Set widget-field underline face to border color
The widget-field underline inherits the foreground color by default.
This change ensures it uses the border face for better visual
consistency.

Fixes: https://github.com/protesilaos/modus-themes/issues/192
2026-01-05 10:13:32 +05:30