branch: externals/modus-themes
commit 76ea63481649779e3650e20fc1fd587ff84de1de
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
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.
---
doc/modus-themes.info | 464 ++++++++++++++++++++++++--------------------------
doc/modus-themes.org | 12 +-
modus-themes.el | 3 +-
3 files changed, 225 insertions(+), 254 deletions(-)
diff --git a/doc/modus-themes.info b/doc/modus-themes.info
index 0155118f80..2a37ee5546 100644
--- a/doc/modus-themes.info
+++ b/doc/modus-themes.info
@@ -171,7 +171,7 @@ DIY Stylistic variants using palette overrides
* DIY Make Org agenda more or less colorful::
* DIY Make inline code in prose use alternative styles::
* DIY Make mail citations and headers more or less colorful::
-* DIY Make the region preserve text colors, plus other styles::
+* DIY Make the region preserve text colors, plus other styles: DIY Make the
region preserve text colors plus other styles.
* DIY Make mouse highlights more or less colorful::
* DIY Make language underlines less colorful::
* DIY Make line numbers use alternative styles::
@@ -213,7 +213,7 @@ Frequently Asked Questions
* Is the contrast ratio about adjacent colors?::
* What does it mean to avoid exaggerations?::
-* Why are colors mostly variants of blue, magenta, cyan?::
+* Why are colors mostly variants of blue, magenta, cyan?: Why are colors
mostly variants of blue magenta cyan?.
* What is the best setup for legibility?::
* Are these color schemes?::
* Port the Modus themes to other platforms?::
@@ -282,7 +282,7 @@ Tritanopia themes
To ensure that users have a consistently accessible experience, the
themes strive to achieve as close to full face coverage as possible,
while still targeting a curated list of well-maintained packages (*note
-Face coverage: Face coverage.).
+Face coverage::).
The overarching objective of this project is to always offer
accessible color combinations. There shall never be a compromise on
@@ -306,8 +306,7 @@ File: modus-themes.info, Node: How do the themes look
like, Next: Learn about
Check the web page with the screen shots
(https://protesilaos.com/emacs/modus-themes-pictures/). Note that the
-themes are highly customizable (*note Customization options:
-Customization options.).
+themes are highly customizable (*note Customization options::).
File: modus-themes.info, Node: Learn about the latest changes, Prev: How do
the themes look like, Up: Overview
@@ -365,8 +364,7 @@ stored in ‘~/.emacs.d’ and that you want to place the Modus
themes in
(add-to-list 'load-path "~/.emacs.d/modus-themes")
- The themes are now ready to be used: *note Enable and load: Enable
-and load.
+ The themes are now ready to be used: *note Enable and load::.
File: modus-themes.info, Node: Install from the archives, Next: Install on
GNU/Linux, Prev: Install manually from source, Up: Installation
@@ -382,7 +380,7 @@ with ‘M-x package-refresh-contents’. Then all you need to
do is type
‘M-x package-install’ and specify the ‘modus-themes’.
Once installed, the themes are ready to be used: *note Enable and
-load: Enable and load.
+load::.
File: modus-themes.info, Node: Install on GNU/Linux, Next: Dealing with byte
compilation errors, Prev: Install from the archives, Up: Installation
@@ -410,8 +408,7 @@ The themes are part of Debian 11 Bullseye. Get them with:
sudo apt install elpa-modus-themes
- They are now ready to be used: *note Enable and load: Enable and
-load.
+ They are now ready to be used: *note Enable and load::.
NOTE that Debian's package is severely out-of-date as of this writing
2022-07-24 09:57 +0300.
@@ -426,8 +423,7 @@ Users of Guix can get the themes with this command:
guix package -i emacs-modus-themes
- They are now ready to be used: *note Enable and load: Enable and
-load.
+ They are now ready to be used: *note Enable and load::.
File: modus-themes.info, Node: Dealing with byte compilation errors, Prev:
Install on GNU/Linux, Up: Installation
@@ -456,7 +452,7 @@ the relevant upstream maintainer. Whatever you do, please
understand
that a build failure does not mean we are necessarily doing something
wrong.
- *note Issues you can help with: Issues you can help with.
+ *note Issues you can help with::.
File: modus-themes.info, Node: Enable and load, Next: Customization options,
Prev: Installation, Up: Top
@@ -478,8 +474,8 @@ of their preference by adding either form to their init
file:
(load-theme 'modus-operandi) ; Light theme
(load-theme 'modus-vivendi) ; Dark theme
- Remember that there are multiple Modus themes (*note Overview:
-Overview.). Adapt the above snippet accordingly.
+ Remember that there are multiple Modus themes (*note Overview::).
+Adapt the above snippet accordingly.
Users of packaged variants of the themes must add a few more lines to
ensure that everything works as intended. First, one has to require the
@@ -529,8 +525,7 @@ themes.):
(define-key global-map (kbd "<f5>") #'modus-themes-toggle)
- *note Sample configuration with and without use-package: Sample
-configuration with and without use-package.
+ *note Sample configuration with and without use-package::.
To disable other themes before loading a Modus theme, use something
like this:
@@ -549,13 +544,12 @@ the user opts in (*note Option for disabling other themes
while loading
Modus: Disable other themes.). After loading the theme of choice, this
function calls the hook ‘modus-themes-after-load-theme-hook’ (alias
‘modus-themes-post-load-hook’). Users can add their own functions to
-this hook to make further customizations (*note Advanced customization:
-Advanced customization.).
+this hook to make further customizations (*note Advanced
+customization::).
The commands ‘modus-themes-toggle’ and ‘modus-themes-select’ use
‘modus-themes-load-theme’ internally (*note Option for which themes to
-toggle: Option for which themes to toggle.). The aforementioned hold
-true for them as well.
+toggle::). The aforementioned hold true for them as well.
* Menu:
@@ -597,7 +591,7 @@ File: modus-themes.info, Node: Sample configuration with
and without use-packag
=====================================================
What follows is a variant of what we demonstrate in the previous section
-(*note Enable and load: Enable and load.).
+(*note Enable and load::).
It is common for Emacs users to rely on ‘use-package’ for declaring
package configurations in their setup. We use this as an example:
@@ -656,8 +650,7 @@ package configurations in their setup. We use this as an
example:
(define-key global-map (kbd "<f5>") #'modus-themes-toggle)
- *note Differences between loading and enabling: Differences between
-loading and enabling.
+ *note Differences between loading and enabling::.
Note: make sure not to customize the variable
‘custom-theme-load-path’ or ‘custom-theme-directory’ after the themes'
@@ -705,8 +698,7 @@ session, are better off using something like this:
*note Toggle themes without reloading them: DIY Toggle themes without
reloading them.
- *note Sample configuration with and without use-package: Sample
-configuration with and without use-package.
+ *note Sample configuration with and without use-package::.
With the above granted, other sections of the manual discuss how to
configure custom faces, where ‘load-theme’ is expected, though
@@ -731,8 +723,8 @@ everything at length in the pages of this manual and also
provide
ready-to-use code samples.
Remember that all customization options must be evaluated before
-loading a theme (*note Enable and load: Enable and load.). If the theme
-is already active, it must be reloaded for changes to take effect.
+loading a theme (*note Enable and load::). If the theme is already
+active, it must be reloaded for changes to take effect.
;; In all of the following, WEIGHT is a symbol such as `semibold',
;; `light', `bold', or anything mentioned in `modus-themes-weights'.
@@ -818,7 +810,7 @@ Custom UI or related functions such as
‘customize-set-variable’ and
With a ‘nil’ value, changes to user options have no further
consequences: the user must manually reload the theme (*note Enable and
-load: Enable and load.).
+load::).
File: modus-themes.info, Node: Disable other themes, Next: Bold constructs,
Prev: Custom reload theme, Up: Customization options
@@ -838,10 +830,9 @@ Brief: Disable all other themes when loading a Modus theme.
When the value is non-‘nil’, the commands ‘modus-themes-toggle’ and
‘modus-themes-select’, as well as the ‘modus-themes-load-theme’
function, will disable all other themes while loading the specified
-Modus theme (*note Option for which themes to toggle: Option for which
-themes to toggle.). This is done to ensure that Emacs does not blend
-two or more themes: such blends lead to awkward results that undermine
-the work of the designer.
+Modus theme (*note Option for which themes to toggle::). This is done
+to ensure that Emacs does not blend two or more themes: such blends lead
+to awkward results that undermine the work of the designer.
When the value is ‘nil’, the aforementioned commands and function
will only disable other themes within the Modus collection.
@@ -1117,12 +1108,11 @@ File: modus-themes.info, Node: Org mode blocks, Next:
Heading styles, Prev: C
As part of version ‘4.4.0’, the ‘modus-themes-org-blocks’ is no more.
Users can apply palette overrides to set a style that fits their
preference (purple, blue, yellow, green, etc.). It is more flexible and
-more powerful (*note DIY Make Org block colors more or less colorful:
-DIY Make Org block colors more or less colorful.)
+more powerful (*note DIY Make Org block colors more or less colorful::)
For the option to change the background of Org source blocks, we
provide the relevant setup (*note DIY Use colored Org source blocks per
-language: DIY Use colored Org source blocks per language.).
+language::).
File: modus-themes.info, Node: Heading styles, Next: UI typeface, Prev: Org
mode blocks, Up: Customization options
@@ -1366,9 +1356,8 @@ cyan hue to keywords:
(comment red-faint)
(keyword cyan-cooler)))
- Changes take effect upon theme reload (*note Custom reload theme:
-Custom reload theme.). Overrides are removed by setting their variable
-to a ‘nil’ value.
+ Changes take effect upon theme reload (*note Custom reload theme::).
+Overrides are removed by setting their variable to a ‘nil’ value.
The common accented foregrounds in each palette follow a predictable
naming scheme: ‘HUE{,-warmer,-cooler,-faint,-intense}’. ‘HUE’ is one of
@@ -1380,8 +1369,7 @@ that are meant to be combined with such backgrounds,
contain ‘fg’ in
their name, such as ‘fg-removed’ which complements ‘bg-removed’.
Named colors can be previewed, such as with the command
-‘modus-themes-list-colors’ (*note Preview theme colors: Preview theme
-colors.).
+‘modus-themes-list-colors’ (*note Preview theme colors::).
For a video tutorial that users of all skill levels can approach,
watch:
@@ -1503,17 +1491,15 @@ File: modus-themes.info, Node: Use colors from the
Modus themes palette, Next:
The Modus themes provide the means to access the palette of (i) the
active theme or (ii) any theme in the Modus collection. These are
-useful for Do-It-Yourself customizations (*note Advanced customization:
-Advanced customization.), though it can also be helpful in other cases,
-such as to reuse a color value in some other application.
+useful for Do-It-Yourself customizations (*note Advanced
+customization::), though it can also be helpful in other cases, such as
+to reuse a color value in some other application.
Function
*note Get a single color from the palette with
- ‘modus-themes-get-color-value’: Get a single color from the palette
- with modus-themes-get-color-value.
+ modus-themes-get-color-value::
Macro
- *note Use theme colors in code with ‘modus-themes-with-colors’: Use
- theme colors in code with modus-themes-with-colors.
+ *note Use theme colors in code with modus-themes-with-colors::.
* Menu:
@@ -1532,7 +1518,7 @@ takea a ‘COLOR’ argument and an optional ‘OVERRIDES’. It
also accepts a
third ‘THEME’ argument, to get the color from the given theme.
‘COLOR’ is a symbol that represents a named color entry in the
-palette (*note Preview theme colors: Preview theme colors.).
+palette (*note Preview theme colors::).
If the value is the name of another color entry in the palette (so a
mapping), this function recurs until it finds the underlying color
@@ -1597,8 +1583,8 @@ of it. For example:
The above return value is for ‘modus-operandi’ when that is the
active theme. Switching to another theme and evaluating this code anew
will return the relevant results for that theme (remember that since
-version 4, the Modus themes consist of many items (*note Overview:
-Overview.)). The same with ‘modus-vivendi’ as the active theme:
+version 4, the Modus themes consist of many items (*note Overview::)).
+The same with ‘modus-vivendi’ as the active theme:
(modus-themes-with-colors
(list blue-warmer magenta-cooler fg-added warning variable
fg-heading-4))
@@ -1607,14 +1593,12 @@ Overview.)). The same with ‘modus-vivendi’ as the
active theme:
The ‘modus-themes-with-colors’ has access to the whole palette of the
active theme, meaning that it can instantiate both (i) named colors like
‘blue-warmer’ and (ii) semantic color mappings like ‘warning’. We
-provide commands to inspect those (*note Preview theme colors: Preview
-theme colors.).
+provide commands to inspect those (*note Preview theme colors::).
Others sections in this manual show how to use the aforementioned
-macro (*note Advanced customization: Advanced customization.). In
-practice, the use of a hook will also be needed (*note DIY Use a hook at
-the post-load-theme phase: DIY Use a hook at the post-load-theme
-phase.).
+macro (*note Advanced customization::). In practice, the use of a hook
+will also be needed (*note DIY Use a hook at the post-load-theme
+phase::).
File: modus-themes.info, Node: Advanced customization, Next: Face coverage,
Prev: Use colors from the Modus themes palette, Up: Top
@@ -1737,7 +1721,7 @@ changes to use the colors of the active Modus theme.
defines to the corresponding entry in the palette of the active Modus
theme. We then use a hook to ensure that the value is updated after we
switch to another theme in the collection (*note DIY Use a hook at the
-post-load-theme phase: DIY Use a hook at the post-load-theme phase.).
+post-load-theme phase::).
(defun my-modus-themes-engraved-faces (&rest _)
(modus-themes-with-colors
@@ -1852,7 +1836,7 @@ Palette override presets: DIY Palette override presets.).
* DIY Make Org agenda more or less colorful::
* DIY Make inline code in prose use alternative styles::
* DIY Make mail citations and headers more or less colorful::
-* DIY Make the region preserve text colors, plus other styles::
+* DIY Make the region preserve text colors, plus other styles: DIY Make the
region preserve text colors plus other styles.
* DIY Make mouse highlights more or less colorful::
* DIY Make language underlines less colorful::
* DIY Make line numbers use alternative styles::
@@ -2561,8 +2545,7 @@ nice combinations:
(fg-prose-block-delimiter cyan-cooler)))
[ Combine the above with a suitable mode line style for maximum
-effect (*note DIY Make the active mode line colorful: DIY Make the
-active mode line colorful.). ]
+effect (*note DIY Make the active mode line colorful::). ]
Finally, the following makes code blocks have no distinct background.
The minimal styles are applied to the delimiter lines, which only use a
@@ -2578,8 +2561,7 @@ until version 4.3.0.
(bg-prose-block-delimiter unspeficied)
(fg-prose-block-delimiter fg-dim)))
- *note DIY Use colored Org source blocks per language: DIY Use colored
-Org source blocks per language.
+ *note DIY Use colored Org source blocks per language::.
File: modus-themes.info, Node: DIY Make Org agenda more or less colorful,
Next: DIY Make inline code in prose use alternative styles, Prev: DIY Make Org
block colors more or less colorful, Up: DIY Stylistic variants using palette
overrides
@@ -2667,8 +2649,7 @@ permutation.
• *note Make TODO and DONE more or less intense: DIY Make TODO and
DONE more or less intense.
- • *note DIY Make Org block colors more or less colorful: DIY Make Org
- block colors more or less colorful.
+ • *note DIY Make Org block colors more or less colorful::.
;; A nuanced accented background, combined with a suitable foreground.
(setq modus-themes-common-palette-overrides
@@ -2706,7 +2687,7 @@ permutation.
Reload the theme for changes to take effect.
-File: modus-themes.info, Node: DIY Make mail citations and headers more or
less colorful, Next: DIY Make the region preserve text colors, plus other
styles, Prev: DIY Make inline code in prose use alternative styles, Up: DIY
Stylistic variants using palette overrides
+File: modus-themes.info, Node: DIY Make mail citations and headers more or
less colorful, Next: DIY Make the region preserve text colors plus other
styles, Prev: DIY Make inline code in prose use alternative styles, Up: DIY
Stylistic variants using palette overrides
7.3.18 DIY Make mail citations and headers more or less colorful
----------------------------------------------------------------
@@ -2765,7 +2746,7 @@ Before we show the code, this is the anatomy of a message:
Reload the theme for changes to take effect.
-File: modus-themes.info, Node: DIY Make the region preserve text colors,
plus other styles, Next: DIY Make mouse highlights more or less colorful,
Prev: DIY Make mail citations and headers more or less colorful, Up: DIY
Stylistic variants using palette overrides
+File: modus-themes.info, Node: DIY Make the region preserve text colors plus
other styles, Next: DIY Make mouse highlights more or less colorful, Prev:
DIY Make mail citations and headers more or less colorful, Up: DIY Stylistic
variants using palette overrides
7.3.19 DIY Make the region preserve text colors, plus other styles
------------------------------------------------------------------
@@ -2799,7 +2780,7 @@ region background.
Reload the theme for changes to take effect.
-File: modus-themes.info, Node: DIY Make mouse highlights more or less
colorful, Next: DIY Make language underlines less colorful, Prev: DIY Make
the region preserve text colors, plus other styles, Up: DIY Stylistic
variants using palette overrides
+File: modus-themes.info, Node: DIY Make mouse highlights more or less
colorful, Next: DIY Make language underlines less colorful, Prev: DIY Make
the region preserve text colors plus other styles, Up: DIY Stylistic variants
using palette overrides
7.3.20 DIY Make mouse highlights more or less colorful
------------------------------------------------------
@@ -3050,8 +3031,8 @@ the background). It thus falls back to the closest
approximation, which
seldom is appropriate for the purposes of the Modus themes.
In such a case, the user is expected to update their terminal's color
-palette such as by adapting these resources (*note Preview theme colors:
-Preview theme colors.):
+palette such as by adapting these resources (*note Preview theme
+colors::):
! Theme: modus-operandi
! Description: XTerm port of modus-operandi (Modus themes for GNU Emacs)
@@ -3148,8 +3129,8 @@ Emacs configuration file will suffice:
(custom-set-faces
'(region ((t :extend nil))))
- *note Make the region preserve text colors, plus other styles: DIY
-Make the region preserve text colors, plus other styles.
+ *note Make the region preserve text colors, plus other styles: DIY
+Make the region preserve text colors plus other styles.
File: modus-themes.info, Node: DIY Add padding to the mode line, Next: DIY
Remap face with local value, Prev: DIY Do not extend the region background,
Up: Advanced customization
@@ -3408,11 +3389,10 @@ pick fonts that work well together):
To ensure that the effects persist after switching between the Modus
themes (such as with ‘M-x modus-themes-toggle’), the user needs to write
their configurations to a function and pass it to the
-‘modus-themes-after-load-theme-hook’ (*note Enable and load: Enable and
-load.). This is necessary because themes set the styles of faces upon
-activation, overriding prior values where conflicts occur between the
-previous and the current states (otherwise changing themes would not be
-possible).
+‘modus-themes-after-load-theme-hook’ (*note Enable and load::). This is
+necessary because themes set the styles of faces upon activation,
+overriding prior values where conflicts occur between the previous and
+the current states (otherwise changing themes would not be possible).
*note A theme-agnostic hook for theme loading: DIY A theme-agnostic
hook for theme loading.
@@ -3659,8 +3639,7 @@ File: modus-themes.info, Node: DIY Use colored Org
source blocks per language,
7.14 DIY Use colored Org source blocks per language
===================================================
-*note DIY Make Org block colors more or less colorful: DIY Make Org
-block colors more or less colorful.
+*note DIY Make Org block colors more or less colorful::.
In versions of the Modus themes before ‘4.4.0’ there was an option to
change the coloration of Org source blocks so that certain languages
@@ -3702,8 +3681,7 @@ mechanism provided by the Modus themes. ]
(add-hook 'modus-themes-after-load-theme-hook
#'my-modus-themes-org-block-faces)
- *note DIY Use a hook at the post-load-theme phase: DIY Use a hook at
-the post-load-theme phase.
+ *note DIY Use a hook at the post-load-theme phase::.
Note that the ‘org-src-block-faces’ accepts a named face, as shown
above, as well as a list of face attributes. The latter approach is not
@@ -3869,7 +3847,7 @@ enough when you only use one theme. However it has the
downside of
setting the background color value only at render time. In other words,
the face remapping function does not get evaluated anew whenever the
theme changes, such as upon invoking ‘M-x modus-themes-toggle’ (*note
-Option for which themes to toggle: Option for which themes to toggle.).
+Option for which themes to toggle::).
To have our face remapping adapt gracefully while switching between
the Modus themes, we need to also account for the current theme and
@@ -3932,8 +3910,7 @@ their own command which calls ‘enable-theme’ instead of
‘load-theme’:
(disable-theme 'modus-vivendi)))
(_ (error "No Modus theme is loaded; evaluate
`modus-themes-load-themes' first"))))
- *note Differences between loading and enabling: Differences between
-loading and enabling.
+ *note Differences between loading and enabling::.
Recall that ‘modus-themes-toggle’ uses ‘load-theme’.
@@ -4109,7 +4086,7 @@ Modus themes (or any other of my themes, for that
matter). Users who
want it must style the faces manually. Below is some sample code, based
on what we cover at length elsewhere in this manual:
- *note Advanced customization: Advanced customization.
+ *note Advanced customization::.
*note Use theme colors in code with modus-themes-with-colors: Use
theme colors in code with modus-themes-with-colors.
@@ -4224,8 +4201,7 @@ hook to apply the desired changes. In most examples,
this hook is the
themes and is called at the end of one the following:
Command ‘modus-themes-toggle’
- *note Option for which themes to toggle: Option for which themes to
- toggle.
+ *note Option for which themes to toggle::.
Command ‘modus-themes-select’
Select a Modus theme using minibuffer completion and then load it.
@@ -4241,10 +4217,9 @@ Function ‘modus-themes-load-theme’
collection cannot benefit from the aforementioned hook: it only works
with the Modus themes. A theme-agnostic hook is needed in such a case.
Before Emacs 29, this had to be set up manually (*note DIY A
-theme-agnostic hook for theme loading: DIY A theme-agnostic hook for
-theme loading.). Starting with Emacs 29, the special hook
-‘enable-theme-functions’ works with anything that uses the basic
-‘enable-theme’ function.
+theme-agnostic hook for theme loading::). Starting with Emacs 29, the
+special hook ‘enable-theme-functions’ works with anything that uses the
+basic ‘enable-theme’ function.
To use the ‘enable-theme-functions’ just add the given function to it
the way it is done with every hook:
@@ -4752,7 +4727,7 @@ relevant faces to yield the desired color combinations.
local setup. Below is some sample code, based on what we cover at
length elsewhere in this manual:
- *note Advanced customization: Advanced customization.
+ *note Advanced customization::.
*note Use theme colors in code with modus-themes-with-colors: Use
theme colors in code with modus-themes-with-colors.
@@ -4931,7 +4906,7 @@ some of the techniques that are discussed at length in
the various
"Do-It-Yourself" (DIY) sections, which provide insight into the more
advanced customization options of the themes.
- *note Advanced customization: Advanced customization.
+ *note Advanced customization::.
In the following example, we are assuming that the user wants to (i)
reuse color variables provided by the themes, (ii) be able to retain
@@ -5307,7 +5282,7 @@ which is slightly below our nominal target. Try this
instead:
(setq ement-room-prism-minimum-contrast 7)
With regard to fonts, Ement depends on ‘shr’ (*note Note on SHR
-fonts: Note on SHR fonts.).
+fonts::).
Since we are here, here is an excerpt from Ement's source code:
@@ -5423,7 +5398,7 @@ themes' design and application.
* Is the contrast ratio about adjacent colors?::
* What does it mean to avoid exaggerations?::
-* Why are colors mostly variants of blue, magenta, cyan?::
+* Why are colors mostly variants of blue, magenta, cyan?: Why are colors
mostly variants of blue magenta cyan?.
* What is the best setup for legibility?::
* Are these color schemes?::
* Port the Modus themes to other platforms?::
@@ -5457,7 +5432,7 @@ be colored differently. They would still be legible
though, which is
the primary objective of the Modus themes.
-File: modus-themes.info, Node: What does it mean to avoid exaggerations?,
Next: Why are colors mostly variants of blue, magenta, cyan?, Prev: Is the
contrast ratio about adjacent colors?, Up: Frequently Asked Questions
+File: modus-themes.info, Node: What does it mean to avoid exaggerations?,
Next: Why are colors mostly variants of blue magenta cyan?, Prev: Is the
contrast ratio about adjacent colors?, Up: Frequently Asked Questions
10.2 What does it mean to avoid exaggerations?
==============================================
@@ -5490,7 +5465,7 @@ magenta can suffice to tell things apart and avoid excess
coloration: a
harmonious rhythm.
-File: modus-themes.info, Node: Why are colors mostly variants of blue,
magenta, cyan?, Next: What is the best setup for legibility?, Prev: What
does it mean to avoid exaggerations?, Up: Frequently Asked Questions
+File: modus-themes.info, Node: Why are colors mostly variants of blue magenta
cyan?, Next: What is the best setup for legibility?, Prev: What does it mean
to avoid exaggerations?, Up: Frequently Asked Questions
10.3 Why are colors mostly variants of blue, magenta, cyan?
===========================================================
@@ -5500,8 +5475,7 @@ others for the accessibility purposes of the themes, the
stylistic
consistency between ‘modus-operandi’ and ‘modus-vivendi’, and the
avoidance of exaggerations in design.
- *note What does it mean to avoid exaggerations?: What does it mean to
-avoid exaggerations?.
+ *note What does it mean to avoid exaggerations?::
What we describe as color is a function of three distinct channels of
light: red, green, blue. In hexadecimal RGB notation, a color value is
@@ -5544,8 +5518,7 @@ adjacent colors, it is not possible to make red, green,
and yellow the
main colors, because blue cannot be used to control their luminance and,
thus the relevant space will shrink considerably.
- *note Is the contrast ratio about adjacent colors?: Is the contrast
-ratio about adjacent colors?.
+ *note Is the contrast ratio about adjacent colors?::
This phenomenon is best illustrated by the following table that
measures the relative luminance of shades of red, yellow, magenta
@@ -5580,7 +5553,7 @@ completely different than ‘modus-operandi’, to the effect
that the two
could not be properly considered part of the same project.
-File: modus-themes.info, Node: What is the best setup for legibility?, Next:
Are these color schemes?, Prev: Why are colors mostly variants of blue,
magenta, cyan?, Up: Frequently Asked Questions
+File: modus-themes.info, Node: What is the best setup for legibility?, Next:
Are these color schemes?, Prev: Why are colors mostly variants of blue magenta
cyan?, Up: Frequently Asked Questions
10.4 What is the best setup for legibility?
===========================================
@@ -5725,7 +5698,7 @@ For example, some of the customization options accept a
list as their
value, or an alist, which may not be possible to reproduce on other
platforms.
- *note Customization options: Customization options.
+ *note Customization options::.
In other words, if something must be done differently on a certain
editor then that is acceptable so long as (i) the accessibility
@@ -5737,12 +5710,12 @@ scientific foundations of the themes: high legibility
and taking care of
the needs of users with red-green/blue-yellow color deficiency
(deuteranopia and tritanopia) by avoiding red+green color coding
paradigms and/or by providing yellow+blue variants for deuteranopia and
-red+cyan for tritanopia (*note Overview: Overview.).
+red+cyan for tritanopia (*note Overview::).
The latter criterion is the "je ne sais quoi" of the artistic aspect
of the themes, which is partially fleshed out in this manual.
- *note Frequently Asked Questions: Frequently Asked Questions.
+ *note Frequently Asked Questions::.
With regard to the artistic aspect (where "art" qua skill may amount
to an imprecise science), there is no hard-and-fast rule in effect as it
@@ -5815,8 +5788,7 @@ modus-themes public mailing list
• Send patches for code refinements (if you need, ask me for help
with Git--we all start out as beginners).
- *note Patches require copyright assignment to the FSF: Patches
-require copyright assignment to the FSF.
+ *note Patches require copyright assignment to the FSF::.
It is preferable that your feedback includes some screenshots, GIFs,
or short videos, as well as further instructions to reproduce a given
@@ -5947,12 +5919,12 @@ Ideas and user feedback
Janiška, Shreyas Ragavan, Simon Pugnet, Steve Downey, Tassilo Horn,
Thanos Apollo, Thibaut Verron, Thomas Heartman, Togan Muftuoglu,
Tony Zorman, Trey Merkley, Tomasz Hołubowicz, Toon Claes, Uri
- Sharf, Utkarsh Singh, Vincent Foley, Zoltan Kiraly. As well as
- users: Ben, CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux,
- Fredrik, Moesasji, Nick, Summer Emacs, TheBlob42, TitusMu, Trey,
- bepolymathe, bit9tream, bangedorrunt, case-lambda, derek-upham,
- doolio, fleimgruber, gitrj95, iSeeU, jixiuf, ltmsyvag, okamsn,
- pedro-nonfree, pRot0ta1p, shipmints, soaringbird, tumashu,
+ Sharf, Utkarsh Singh, Vincent Foley, Zhengyi Fu, Zoltan Kiraly. As
+ well as users: Ben, CsBigDataHub1, Emacs Contrib, Eugene,
+ Fourchaux, Fredrik, Moesasji, Nick, Summer Emacs, TheBlob42,
+ TitusMu, Trey, bepolymathe, bit9tream, bangedorrunt, case-lambda,
+ derek-upham, doolio, fleimgruber, gitrj95, iSeeU, jixiuf, ltmsyvag,
+ okamsn, pedro-nonfree, pRot0ta1p, shipmints, soaringbird, tumashu,
wakamenod.
Packaging
@@ -6480,13 +6452,13 @@ B.1 Function index
(line 6)
* modus-themes-list-colors: Preview theme colors. (line 6)
* modus-themes-list-colors-current: Preview theme colors. (line 10)
-* modus-themes-load-theme: Enable and load. (line 80)
+* modus-themes-load-theme: Enable and load. (line 79)
* modus-themes-preview-colors: Preview theme colors. (line 18)
* modus-themes-preview-colors-current: Preview theme colors. (line 18)
* modus-themes-rotate: Option for which themes to rotate.
(line 6)
-* modus-themes-select: Enable and load. (line 94)
-* modus-themes-toggle: Enable and load. (line 94)
+* modus-themes-select: Enable and load. (line 93)
+* modus-themes-toggle: Enable and load. (line 93)
* modus-themes-toggle <1>: Option for which themes to toggle.
(line 6)
* modus-themes-wcag-formula: DIY Measure color contrast.
@@ -6513,7 +6485,7 @@ B.2 Variable index
* modus-operandi-tritanopia-palette-overrides: Palette overrides.
(line 34)
* modus-operandi-tritanopia-palette-user: Palette extension. (line 26)
-* modus-themes-after-load-theme-hook: Enable and load. (line 86)
+* modus-themes-after-load-theme-hook: Enable and load. (line 85)
* modus-themes-bold-constructs: Bold constructs. (line 6)
* modus-themes-common-palette-overrides: Palette overrides. (line 22)
* modus-themes-common-palette-user: Palette extension. (line 16)
@@ -6524,7 +6496,7 @@ B.2 Variable index
* modus-themes-italic-constructs: Italic constructs. (line 6)
* modus-themes-mixed-fonts: Mixed fonts. (line 6)
* modus-themes-org-blocks: Org mode blocks. (line 6)
-* modus-themes-post-load-hook: Enable and load. (line 86)
+* modus-themes-post-load-hook: Enable and load. (line 85)
* modus-themes-preset-overrides-cooler: DIY Palette override presets.
(line 29)
* modus-themes-preset-overrides-faint: DIY Palette override presets.
@@ -6585,7 +6557,7 @@ B.3 Concept index
(line 6)
* Implicitly supported packages: Indirectly covered packages.
(line 6)
-* Innate color qualities of the palette: Why are colors mostly variants of
blue, magenta, cyan?.
+* Innate color qualities of the palette: Why are colors mostly variants of
blue magenta cyan?.
(line 6)
* load-theme VS enable-theme: Differences between loading and
enabling.
(line 6)
@@ -6621,133 +6593,133 @@ B.3 Concept index
Tag Table:
Node: Top874
-Node: Overview8534
-Node: How do the themes look like11314
-Node: Learn about the latest changes11695
-Node: Installation12083
-Node: Install manually from source12994
-Node: Install from the archives13832
-Node: Install on GNU/Linux14446
-Node: Debian 11 Bullseye14937
-Node: GNU Guix15360
-Node: Dealing with byte compilation errors15658
-Node: Enable and load16840
-Node: The require-theme for built-in Emacs themes20900
-Node: Sample configuration with and without use-package22020
-Node: Differences between loading and enabling24922
-Node: Customization options27094
-Node: Custom reload theme31019
-Node: Disable other themes31955
-Node: Bold constructs33231
-Node: Italic constructs34103
-Node: Option for which themes to toggle34931
-Node: Option for which themes to rotate35694
-Node: Mixed fonts36470
-Node: Command prompts37524
-Node: Completion UIs39365
-Node: Org mode blocks42214
-Node: Heading styles42954
-Node: UI typeface47380
-Node: Palette overrides48353
-Node: Palette extension52781
-Node: Preview theme colors55257
-Node: Use colors from the Modus themes palette56809
-Node: Get a single color from the palette with
modus-themes-get-color-value57842
-Node: Use theme colors in code with modus-themes-with-colors60224
-Node: Advanced customization62576
-Node: DIY Palette override presets64335
-Node: DIY Add support for engrave-faces67169
-Node: DIY Stylistic variants using palette overrides77196
-Node: DIY Make the mode line borderless79196
-Node: DIY Make the active mode line colorful80571
-Node: DIY Make the tab bar more or less colorful82789
-Node: DIY Make the fringe invisible or another color84726
-Node: DIY Make links use subtle or no underlines85923
-Node: DIY Make prompts more or less colorful87041
-Node: DIY Make completion matches more or less colorful88364
-Node: DIY Make comments yellow and strings green91923
-Node: DIY Make code syntax use the old alt-syntax style93630
-Node: DIY Make use of alternative styles for code syntax96743
-Node: DIY Make matching parenthesis more or less intense100205
-Node: DIY Make box buttons more or less gray101577
-Node: DIY Make TODO and DONE more or less intense102590
-Node: DIY Make headings more or less colorful104091
-Node: DIY Make Org block colors more or less colorful106208
-Node: DIY Make Org agenda more or less colorful110665
-Node: DIY Make inline code in prose use alternative styles113840
-Node: DIY Make mail citations and headers more or less colorful116132
-Node: DIY Make the region preserve text colors, plus other styles118535
-Node: DIY Make mouse highlights more or less colorful120094
-Node: DIY Make language underlines less colorful121110
-Node: DIY Make line numbers use alternative styles122262
-Node: DIY Make diffs use only a foreground123905
-Node: DIY Make deuteranopia diffs red and blue instead of yellow and
blue126792
-Node: DIY More accurate colors in terminal emulators129264
-Node: DIY Range of color with terminal emulators130572
-Node: DIY Per-theme customization settings133380
-Node: DIY Do not extend the region background134813
-Node: DIY Add padding to the mode line135614
-Node: DIY Remap face with local value138542
-Node: DIY Font configurations for Org and others141081
-Ref: DIY Font configurations for Org and others-Footnote-1144064
-Node: DIY Configure bold and italic faces144251
-Node: DIY Custom Org todo keyword and priority faces148889
-Node: DIY Custom Org emphasis faces152630
-Node: DIY Use colored Org source blocks per language157507
-Node: DIY Measure color contrast162237
-Node: DIY Load theme depending on time of day164954
-Node: DIY Backdrop for pdf-tools165982
-Node: DIY Toggle themes without reloading them169177
-Node: DIY Use more spacious margins or padding in Emacs frames170526
-Node: DIY Custom hl-todo colors174763
-Node: DIY Add support for solaire-mode176580
-Node: DIY Add support for meow-mode179694
-Node: DIY Add support for combobulate181504
-Node: DIY Use a hook at the post-load-theme phase185127
-Node: DIY A theme-agnostic hook for theme loading187330
-Node: Face coverage189961
-Node: Supported packages190413
-Node: Indirectly covered packages196279
-Node: Notes on individual packages197635
-Node: Note on calendarel weekday and weekend colors198735
-Node: Note on git-gutter in Doom Emacs199883
-Node: Note on php-mode multiline comments202405
-Node: Note on underlines in compilation buffers203165
-Node: Note on inline Latex in Org buffers204037
-Node: Note on dimmerel204647
-Node: Note on display-fill-column-indicator-mode206132
-Node: Note on highlight-parenthesesel207583
-Node: Note on mmm-modeel background colors213682
-Node: Note for prism216034
-Node: Note on company-mode overlay pop-up219246
-Ref: Note on company-mode overlay pop-up-Footnote-1219974
-Ref: Note on company-mode overlay pop-up-Footnote-2220041
-Node: Note on ERC escaped color sequences220096
-Ref: Note on ERC escaped color sequences-Footnote-1221524
-Node: Note on powerline or spaceline221634
-Node: Note on SHR colors222048
-Node: Note on SHR fonts222468
-Node: Note on Ement colors and fonts223155
-Node: Note on pdf-tools link hints224677
-Node: Note on the Notmuch logo227133
-Node: Note on goto-address-mode faces227665
-Node: Frequently Asked Questions228783
-Node: Is the contrast ratio about adjacent colors?229361
-Node: What does it mean to avoid exaggerations?230870
-Node: Why are colors mostly variants of blue, magenta, cyan?232724
-Node: What is the best setup for legibility?237149
-Node: Are these color schemes?239795
-Node: Port the Modus themes to other platforms?243449
-Node: Contributing246339
-Node: Sources of the themes246738
-Node: Issues you can help with247634
-Node: Patches require copyright assignment to the FSF249073
-Node: Acknowledgements251295
-Node: GNU Free Documentation License255722
-Node: Indices280885
-Node: Function index281064
-Node: Variable index282660
-Node: Concept index286160
+Node: Overview8646
+Node: How do the themes look like11412
+Node: Learn about the latest changes11771
+Node: Installation12159
+Node: Install manually from source13070
+Node: Install from the archives13893
+Node: Install on GNU/Linux14492
+Node: Debian 11 Bullseye14983
+Node: GNU Guix15391
+Node: Dealing with byte compilation errors15674
+Node: Enable and load16832
+Node: The require-theme for built-in Emacs themes20776
+Node: Sample configuration with and without use-package21896
+Node: Differences between loading and enabling24742
+Node: Customization options26865
+Node: Custom reload theme30774
+Node: Disable other themes31694
+Node: Bold constructs32936
+Node: Italic constructs33808
+Node: Option for which themes to toggle34636
+Node: Option for which themes to rotate35399
+Node: Mixed fonts36175
+Node: Command prompts37229
+Node: Completion UIs39070
+Node: Org mode blocks41919
+Node: Heading styles42564
+Node: UI typeface46990
+Node: Palette overrides47963
+Node: Palette extension52349
+Node: Preview theme colors54825
+Node: Use colors from the Modus themes palette56377
+Node: Get a single color from the palette with
modus-themes-get-color-value57241
+Node: Use theme colors in code with modus-themes-with-colors59602
+Node: Advanced customization61856
+Node: DIY Palette override presets63615
+Node: DIY Add support for engrave-faces66449
+Node: DIY Stylistic variants using palette overrides76432
+Node: DIY Make the mode line borderless78491
+Node: DIY Make the active mode line colorful79866
+Node: DIY Make the tab bar more or less colorful82084
+Node: DIY Make the fringe invisible or another color84021
+Node: DIY Make links use subtle or no underlines85218
+Node: DIY Make prompts more or less colorful86336
+Node: DIY Make completion matches more or less colorful87659
+Node: DIY Make comments yellow and strings green91218
+Node: DIY Make code syntax use the old alt-syntax style92925
+Node: DIY Make use of alternative styles for code syntax96038
+Node: DIY Make matching parenthesis more or less intense99500
+Node: DIY Make box buttons more or less gray100872
+Node: DIY Make TODO and DONE more or less intense101885
+Node: DIY Make headings more or less colorful103386
+Node: DIY Make Org block colors more or less colorful105503
+Node: DIY Make Org agenda more or less colorful109875
+Node: DIY Make inline code in prose use alternative styles113050
+Node: DIY Make mail citations and headers more or less colorful115290
+Node: DIY Make the region preserve text colors plus other styles117690
+Node: DIY Make mouse highlights more or less colorful119246
+Node: DIY Make language underlines less colorful120259
+Node: DIY Make line numbers use alternative styles121411
+Node: DIY Make diffs use only a foreground123054
+Node: DIY Make deuteranopia diffs red and blue instead of yellow and
blue125941
+Node: DIY More accurate colors in terminal emulators128413
+Node: DIY Range of color with terminal emulators129721
+Node: DIY Per-theme customization settings132508
+Node: DIY Do not extend the region background133941
+Node: DIY Add padding to the mode line134739
+Node: DIY Remap face with local value137667
+Node: DIY Font configurations for Org and others140206
+Ref: DIY Font configurations for Org and others-Footnote-1143189
+Node: DIY Configure bold and italic faces143376
+Node: DIY Custom Org todo keyword and priority faces147998
+Node: DIY Custom Org emphasis faces151739
+Node: DIY Use colored Org source blocks per language156616
+Node: DIY Measure color contrast161256
+Node: DIY Load theme depending on time of day163973
+Node: DIY Backdrop for pdf-tools165001
+Node: DIY Toggle themes without reloading them168162
+Node: DIY Use more spacious margins or padding in Emacs frames169471
+Node: DIY Custom hl-todo colors173708
+Node: DIY Add support for solaire-mode175525
+Node: DIY Add support for meow-mode178617
+Node: DIY Add support for combobulate180427
+Node: DIY Use a hook at the post-load-theme phase184050
+Node: DIY A theme-agnostic hook for theme loading186171
+Node: Face coverage188802
+Node: Supported packages189254
+Node: Indirectly covered packages195120
+Node: Notes on individual packages196476
+Node: Note on calendarel weekday and weekend colors197576
+Node: Note on git-gutter in Doom Emacs198724
+Node: Note on php-mode multiline comments201224
+Node: Note on underlines in compilation buffers201984
+Node: Note on inline Latex in Org buffers202856
+Node: Note on dimmerel203466
+Node: Note on display-fill-column-indicator-mode204951
+Node: Note on highlight-parenthesesel206402
+Node: Note on mmm-modeel background colors212479
+Node: Note for prism214831
+Node: Note on company-mode overlay pop-up218043
+Ref: Note on company-mode overlay pop-up-Footnote-1218771
+Ref: Note on company-mode overlay pop-up-Footnote-2218838
+Node: Note on ERC escaped color sequences218893
+Ref: Note on ERC escaped color sequences-Footnote-1220321
+Node: Note on powerline or spaceline220431
+Node: Note on SHR colors220845
+Node: Note on SHR fonts221265
+Node: Note on Ement colors and fonts221952
+Node: Note on pdf-tools link hints223456
+Node: Note on the Notmuch logo225912
+Node: Note on goto-address-mode faces226444
+Node: Frequently Asked Questions227562
+Node: Is the contrast ratio about adjacent colors?228193
+Node: What does it mean to avoid exaggerations?229702
+Node: Why are colors mostly variants of blue magenta cyan?231552
+Node: What is the best setup for legibility?235886
+Node: Are these color schemes?238528
+Node: Port the Modus themes to other platforms?242182
+Node: Contributing245016
+Node: Sources of the themes245415
+Node: Issues you can help with246311
+Node: Patches require copyright assignment to the FSF247703
+Node: Acknowledgements249925
+Node: GNU Free Documentation License254364
+Node: Indices279527
+Node: Function index279706
+Node: Variable index281302
+Node: Concept index284802
End Tag Table
diff --git a/doc/modus-themes.org b/doc/modus-themes.org
index 06095dae39..984b2c7a99 100644
--- a/doc/modus-themes.org
+++ b/doc/modus-themes.org
@@ -5740,12 +5740,12 @@ The Modus themes are a collective effort. Every bit of
work matters.
Pugnet, Steve Downey, Tassilo Horn, Thanos Apollo, Thibaut Verron,
Thomas Heartman, Togan Muftuoglu, Tony Zorman, Trey Merkley, Tomasz
Hołubowicz, Toon Claes, Uri Sharf, Utkarsh Singh, Vincent Foley,
- Zoltan Kiraly. As well as users: Ben, CsBigDataHub1, Emacs Contrib,
- Eugene, Fourchaux, Fredrik, Moesasji, Nick, Summer Emacs, TheBlob42,
- TitusMu, Trey, bepolymathe, bit9tream, bangedorrunt, case-lambda,
- derek-upham, doolio, fleimgruber, gitrj95, iSeeU, jixiuf, ltmsyvag,
- okamsn, pedro-nonfree, pRot0ta1p, shipmints, soaringbird, tumashu,
- wakamenod.
+ Zhengyi Fu, Zoltan Kiraly. As well as users: Ben, CsBigDataHub1,
+ Emacs Contrib, Eugene, Fourchaux, Fredrik, Moesasji, Nick, Summer
+ Emacs, TheBlob42, TitusMu, Trey, bepolymathe, bit9tream,
+ bangedorrunt, case-lambda, derek-upham, doolio, fleimgruber,
+ gitrj95, iSeeU, jixiuf, ltmsyvag, okamsn, pedro-nonfree, pRot0ta1p,
+ shipmints, soaringbird, tumashu, wakamenod.
+ Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii,
Glenn Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core
diff --git a/modus-themes.el b/modus-themes.el
index edcd141426..960b977036 100644
--- a/modus-themes.el
+++ b/modus-themes.el
@@ -1086,8 +1086,7 @@ C1 and C2 are color values written in hexadecimal RGB."
(defun modus-themes--current-theme ()
"Return first enabled Modus theme."
- (car (or (modus-themes--list-enabled-themes)
- (modus-themes--list-known-themes))))
+ (car (modus-themes--list-enabled-themes)))
(defun modus-themes--palette-symbol (theme &optional suffix)
"Return THEME palette as a symbol of the form THEME-palette.