branch: externals/modus-themes
commit 19b21a3876b17627d56a245c6d06292ebaf9c447
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
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>.
---
doc/modus-themes.info | 119 +++++++++++++++++++++++++-------------------------
doc/modus-themes.org | 5 ++-
modus-themes.el | 49 ++++++++++++++++++++-
3 files changed, 111 insertions(+), 62 deletions(-)
diff --git a/doc/modus-themes.info b/doc/modus-themes.info
index f2d889f23b..c11ebcd44a 100644
--- a/doc/modus-themes.info
+++ b/doc/modus-themes.info
@@ -4590,6 +4590,7 @@ have lots of extensions, so the "full support" may not be
100% true…
• eldoc-box
• elfeed
• elfeed-score
+ • elisp (Emacs Lisp semantic highlighting)
• elpher
• embark
• ement
@@ -6100,24 +6101,24 @@ Ideas and user feedback
Charlotte Van Petegem, Christian Tietze, Christopher Dimech,
Christopher League, Damien Cassou, Daniel Mendler, Dario
Gjorgjevski, David Edmondson, Davor Rotim, Divan Santana, Eliraz
- Kedmi, Emanuele Michele Alberto Monterosso, Farasha Euker, Feng
- Shu, Filippo Argiolas, Gautier Ponsinet, Gerry Agbobada, Gianluca
- Recchia, Gonçalo Marrafa, Guilherme Semente, Gustavo Barros,
- Hörmetjan Yiltiz, Ilja Kocken, Imran Khan, Iris Garcia, Ivan
- Popovych, Jabir Ali Ouassou, James Ferguson, Jeremy Friesen, Jerry
- Zhang, Johannes Grødem, John Haman, John Sullivan, John Wick, Jonas
- Collberg, Jorge Morais, Joshua O'Connor, Julio C. Villasante,
- Kenta Usami, Kevin Fleming, Kévin Le Gouguec, Kevin Kainan Li,
- Kostadin Ninev, Laith Bahodi, Lasse Lindner, Len Trigg, Lennart C.
- Karssen, Luis Miguel Castañeda, Magne Hov, Manuel Giraud, Manuel
- Uberti, Mark Bestley, Mark Burton, Mark Simpson, Marko Kocic,
- Markus Beppler, Matt Armstrong, Matthias Fuchs, Mattias Engdegård,
- Mauro Aranda, Maxime Tréca, Michael Goldenberg, Morgan Smith,
- Morgan Willcock, Murilo Pereira, Nicky van Foreest, Nicolas De
- Jaeghere, Nicolas Semrau, Olaf Meeuwissen, Oliver Epper, Pablo
- Stafforini, Paul Poloskov, Pengji Zhang, Pete Kazmier, Peter Wu,
- Philip Kaludercic, Pierre Téchoueyres, Przemysław Kryger, Robert
- Hepple, Roman Rudakov, Russell Sim, Ryan Phillips, Rytis
+ Kedmi, Emanuele Michele Alberto Monterosso, Eshel Yaron, Farasha
+ Euker, Feng Shu, Filippo Argiolas, Gautier Ponsinet, Gerry
+ Agbobada, Gianluca Recchia, Gonçalo Marrafa, Guilherme Semente,
+ Gustavo Barros, Hörmetjan Yiltiz, Ilja Kocken, Imran Khan, Iris
+ Garcia, Ivan Popovych, Jabir Ali Ouassou, James Ferguson, Jeremy
+ Friesen, Jerry Zhang, Johannes Grødem, John Haman, John Sullivan,
+ John Wick, Jonas Collberg, Jorge Morais, Joshua O'Connor, Julio C.
+ Villasante, Kenta Usami, Kevin Fleming, Kévin Le Gouguec, Kevin
+ Kainan Li, Kostadin Ninev, Laith Bahodi, Lasse Lindner, Len Trigg,
+ Lennart C. Karssen, Luis Miguel Castañeda, Magne Hov, Manuel
+ Giraud, Manuel Uberti, Mark Bestley, Mark Burton, Mark Simpson,
+ Marko Kocic, Markus Beppler, Matt Armstrong, Matthias Fuchs,
+ Mattias Engdegård, Mauro Aranda, Maxime Tréca, Michael Goldenberg,
+ Morgan Smith, Morgan Willcock, Murilo Pereira, Nicky van Foreest,
+ Nicolas De Jaeghere, Nicolas Semrau, Olaf Meeuwissen, Oliver Epper,
+ Pablo Stafforini, Paul Poloskov, Pengji Zhang, Pete Kazmier, Peter
+ Wu, Philip Kaludercic, Pierre Téchoueyres, Przemysław Kryger,
+ Robert Hepple, Roman Rudakov, Russell Sim, Ryan Phillips, Rytis
Paškauskas, Rudolf Adamkovič, Sam Kleinman, Samuel Culpepper, Saša
Janiška, Shreyas Ragavan, Simon Pugnet, Steve Downey, Tassilo Horn,
Thanos Apollo, Thibaut Verron, Thomas Heartman, Togan Muftuoglu,
@@ -6911,47 +6912,47 @@ Node: Determine what counts as a Modus theme192823
Node: Create convenience commands to load a derivative theme196015
Node: Face coverage198067
Node: Supported packages198529
-Node: Indirectly covered packages204321
-Node: Notes on individual packages205677
-Node: Note on calendarel weekday and weekend colors206779
-Node: Note on git-gutter in Doom Emacs207929
-Node: Note on php-mode multiline comments210431
-Node: Note on underlines in compilation buffers211193
-Node: Note on inline Latex in Org buffers212067
-Node: Note on dimmerel212679
-Node: Note on display-fill-column-indicator-mode214166
-Node: Note on highlight-parenthesesel215619
-Node: Note on mmm-modeel background colors221698
-Node: Note for prism224052
-Node: Note on company-mode overlay pop-up227266
-Ref: Note on company-mode overlay pop-up-Footnote-1227996
-Ref: Note on company-mode overlay pop-up-Footnote-2228063
-Node: Note on ERC escaped color sequences228118
-Ref: Note on ERC escaped color sequences-Footnote-1229548
-Node: Note on powerline or spaceline229658
-Node: Note on SHR colors230074
-Node: Note on SHR fonts230496
-Node: Note on Ement colors and fonts231185
-Node: Note on pdf-tools link hints232691
-Node: Note on the Notmuch logo235149
-Node: Note on goto-address-mode faces235683
-Node: Frequently Asked Questions236803
-Node: Is the contrast ratio about adjacent colors?237434
-Node: What does it mean to avoid exaggerations?238943
-Node: Why are colors mostly variants of blue magenta cyan?240793
-Node: What is the best setup for legibility?245127
-Node: Are these color schemes?247769
-Node: Port the Modus themes to other platforms?251423
-Node: Contributing254257
-Node: Sources of the themes254656
-Node: Issues you can help with255552
-Node: Patches require copyright assignment to the FSF256944
-Node: Acknowledgements259166
-Node: GNU Free Documentation License263674
-Node: Indices288837
-Node: Function index289016
-Node: Variable index292126
-Node: Concept index296334
+Node: Indirectly covered packages204369
+Node: Notes on individual packages205725
+Node: Note on calendarel weekday and weekend colors206827
+Node: Note on git-gutter in Doom Emacs207977
+Node: Note on php-mode multiline comments210479
+Node: Note on underlines in compilation buffers211241
+Node: Note on inline Latex in Org buffers212115
+Node: Note on dimmerel212727
+Node: Note on display-fill-column-indicator-mode214214
+Node: Note on highlight-parenthesesel215667
+Node: Note on mmm-modeel background colors221746
+Node: Note for prism224100
+Node: Note on company-mode overlay pop-up227314
+Ref: Note on company-mode overlay pop-up-Footnote-1228044
+Ref: Note on company-mode overlay pop-up-Footnote-2228111
+Node: Note on ERC escaped color sequences228166
+Ref: Note on ERC escaped color sequences-Footnote-1229596
+Node: Note on powerline or spaceline229706
+Node: Note on SHR colors230122
+Node: Note on SHR fonts230544
+Node: Note on Ement colors and fonts231233
+Node: Note on pdf-tools link hints232739
+Node: Note on the Notmuch logo235197
+Node: Note on goto-address-mode faces235731
+Node: Frequently Asked Questions236851
+Node: Is the contrast ratio about adjacent colors?237482
+Node: What does it mean to avoid exaggerations?238991
+Node: Why are colors mostly variants of blue magenta cyan?240841
+Node: What is the best setup for legibility?245175
+Node: Are these color schemes?247817
+Node: Port the Modus themes to other platforms?251471
+Node: Contributing254305
+Node: Sources of the themes254704
+Node: Issues you can help with255600
+Node: Patches require copyright assignment to the FSF256992
+Node: Acknowledgements259214
+Node: GNU Free Documentation License263734
+Node: Indices288897
+Node: Function index289076
+Node: Variable index292186
+Node: Concept index296394
End Tag Table
diff --git a/doc/modus-themes.org b/doc/modus-themes.org
index eaf33933f6..5925c07ee7 100644
--- a/doc/modus-themes.org
+++ b/doc/modus-themes.org
@@ -4439,6 +4439,7 @@ have lots of extensions, so the "full support" may not be
100% true…
+ eldoc-box
+ elfeed
+ elfeed-score
++ elisp (Emacs Lisp semantic highlighting)
+ elpher
+ embark
+ ement
@@ -5926,8 +5927,8 @@ The Modus themes are a collective effort. Every bit of
work matters.
Petegem, Christian Tietze, Christopher Dimech, Christopher League,
Damien Cassou, Daniel Mendler, Dario Gjorgjevski, David Edmondson,
Davor Rotim, Divan Santana, Eliraz Kedmi, Emanuele Michele Alberto
- Monterosso, Farasha Euker, Feng Shu, Filippo Argiolas, Gautier
- Ponsinet, Gerry Agbobada, Gianluca Recchia, Gonçalo Marrafa,
+ Monterosso, Eshel Yaron, Farasha Euker, Feng Shu, Filippo Argiolas,
+ Gautier Ponsinet, Gerry Agbobada, Gianluca Recchia, Gonçalo Marrafa,
Guilherme Semente, Gustavo Barros, Hörmetjan Yiltiz, Ilja Kocken,
Imran Khan, Iris Garcia, Ivan Popovych, Jabir Ali Ouassou, James
Ferguson, Jeremy Friesen, Jerry Zhang, Johannes Grødem, John Haman,
diff --git a/modus-themes.el b/modus-themes.el
index 2672373a1d..72405a62cd 100644
--- a/modus-themes.el
+++ b/modus-themes.el
@@ -4512,7 +4512,6 @@ FG and BG are the main colors."
`(comint-highlight-prompt ((,c :inherit modus-themes-prompt)))
`(confusingly-reordered ((,c :underline (:style wave :color
,underline-err))))
`(edmacro-label ((,c :inherit modus-themes-bold :foreground ,accent-0)))
- `(elisp-shorthand-font-lock-face ((,c :inherit modus-themes-slant
:foreground ,preprocessor)))
`(error ((,c :inherit modus-themes-bold :foreground ,err)))
`(escape-glyph ((,c :inherit modus-themes-bold :foreground ,keybind)))
`(file-name-shadow ((,c :foreground ,fg-dim)))
@@ -5145,6 +5144,54 @@ FG and BG are the main colors."
`(elfeed-score-error-level-face ((,c :foreground ,err)))
`(elfeed-score-info-level-face ((,c :foreground ,info)))
`(elfeed-score-warn-level-face ((,c :foreground ,warning)))
+;;;;; elisp semantic highlighting
+ `(elisp-ampersand ((,c :inherit modus-themes-bold :foreground ,type)))
+ `(elisp-binding-variable (( )))
+ `(elisp-bound-variable ((,c :foreground ,variable-use)))
+ `(elisp-charset (( )))
+ `(elisp-coding (( )))
+ `(elisp-completion-category (( )))
+ `(elisp-completion-category-definition ((,c :foreground ,constant)))
+ `(elisp-condition ((,c :inherit modus-themes-bold :foreground ,builtin)))
+ `(elisp-constant (( )))
+ `(elisp-defcharset ((,c :foreground ,type)))
+ `(elisp-defcoding ((,c :foreground ,type)))
+ `(elisp-defface ((,c :foreground ,type)))
+ `(elisp-deficon ((,c :foreground ,type)))
+ `(elisp-defmacro ((,c :foreground ,fnname)))
+ `(elisp-defoclosure ((,c :foreground ,type)))
+ `(elisp-defun ((,c :foreground ,fnname)))
+ `(elisp-defvar ((,c :foreground ,variable)))
+ `(elisp-face (( )))
+ `(elisp-feature (( )))
+ `(elisp-free-variable (( )))
+ `(elisp-function ((,c :foreground ,fnname-call)))
+ `(elisp-function-property-declaration ((,c :foreground ,builtin)))
+ `(elisp-group (( )))
+ `(elisp-icon (( )))
+ `(elisp-macro ((,c :inherit modus-themes-bold :foreground ,keyword)))
+ `(elisp-major-mode-name ((,c :foreground ,type)))
+ `(elisp-nnoo-backend ((,c :foreground ,type)))
+ `(elisp-non-local-exit ((,c :inherit modus-themes-bold :foreground
,warning)))
+ `(elisp-oclosure (( )))
+ `(elisp-rx ((,c :inherit modus-themes-bold :foreground ,builtin)))
+ `(elisp-shadowed-variable (( )))
+ `(elisp-shadowing-variable ((,c :foreground ,variable-use)))
+ `(elisp-shorthand-font-lock-face ((,c :inherit modus-themes-slant
:foreground ,preprocessor)))
+ `(elisp-slot ((,c :foreground ,builtin)))
+ `(elisp-special-form ((,c :inherit modus-themes-bold :foreground
,keyword)))
+ `(elisp-special-variable-declaration (( )))
+ `(elisp-symbol-at-mouse ((,c :background ,bg-hover :foreground ,fg-main)))
+ `(elisp-symbol-role (( )))
+ `(elisp-symbol-role-definition ((,c :foreground ,type)))
+ `(elisp-theme (( )))
+ `(elisp-thing (( )))
+ `(elisp-throw-tag ((,c :inherit modus-themes-bold :foreground ,fg-main)))
+ `(elisp-type (( )))
+ `(elisp-unknown-call ((,c :inherit modus-themes-slant :foreground
,fnname-call)))
+ `(elisp-variable-at-point ((,c :underline ,border)))
+ `(elisp-warning-type ((,c :foreground ,warning)))
+ `(elisp-widget-type (( )))
;;;;; elpher
`(elpher-gemini-heading1 ((,c :inherit modus-themes-heading-1)))
`(elpher-gemini-heading2 ((,c :inherit modus-themes-heading-2)))