From: Protesilaos Stavrou Date: Fri, 1 Apr 2022 09:51:14 +0000 (+0300) Subject: Update modus-themes to their version 2.3.0 X-Git-Tag: emacs-29.0.90~1931^2~839 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7b08e3a8e41db1483322f48305f837e705540249;p=emacs.git Update modus-themes to their version 2.3.0 * doc/misc/modus-themes.org (Enable and load): Clarify wording. (Sample configuration with and without use-package): Improve sample code on how to set up the themes. (Customization Options): Update sample configuration. (Option for box buttons, Option for mode line presentation) (Option for completion framework aesthetics) (Option for Org agenda constructs) (Option for the headings' overall style): Document how to optionally pass number values as a cons cell. (Option for mouseover effects): Document new boolean user option. (More accurate colors in terminal emulators): Write about the color range in terminal emulators and provide sample palette for XTerm. (Override colors): Use American English. (Near-monochrome syntax highlighting): Provide sample code on how to achieve a monochrome style. (Full support for packages or face groups) (Indirectly covered packages): Update lists of supported packages. (Note on display-fill-column-indicator-mode): Reword node. (Note on prism.el): Use American English. (Note on SHR colors): Clarify statement. (Note on the Notmuch logo): Remark that the Notmuch logo can be disabled. (Port the Modus themes to other platforms?): Use American English. (Sources of the themes): Fix capitalization of proper nouns. (Acknowledgements): Update list of contributors to the project. * etc/themes/modus-operandi-theme.el: * etc/themes/modus-vivendi-theme.el: Ensure that the theme is reified as expected both at compiletime and runtime. * etc/themes/modus-themes.el (require): Require 'cl-lib' and 'subr-x' at compiletime. (seq): Require the 'seq' library. (modus-themes-completion-standard-first-match) (modus-themes-completion-standard-selected) (modus-themes-completion-extra-selected): Use correct symbol for deprecated faces. (modus-themes-slanted-constructs): Provide it as an alias of 'modus-themes-italic-constructs'. (modus-themes-variable-pitch-headings): Remove obsolete user option. (modus-themes-no-mixed-fonts): Remove obsolete user option alias. (modus-themes-intense-mouseovers): Add new user option. (modus-themes--headings-choice): Accept value as a cons cell. (modus-themes-headings, modus-themes-org-agenda): Update user option to accept number value as a cons cell. (modus-themes-scale-headings, modus-themes-scale-1, modus-themes-scale-2) (modus-themes-scale-3, modus-themes-scale-4, modus-themes-scale-title) (modus-themes-scale-small): Remove obsolete user options. (modus-themes-mode-line): Update user option to accept number values as cons cells. (modus-themes-mode-line-padding): Remove obsolete user option. (modus-themes-completions): Add support for the 'text-also' property and update it accordingly. (modus-themes-success-deuteranopia): Remove obsolete user option. (modus-themes-box-buttons): Update user option to accept number values as cons cells. (modus-themes--warn, modus-themes--list-or-warn) (modus-themes--alist-or-seq): Add functions to check for correct value in some user options. (modus-themes--current-theme): Return the first Modus theme from 'current-enable-themes' (bug#54598). (modus-themes--lang-check, modus-themes--prompt, modus-themes--paren) (modus-themes--syntax-foreground, modus-themes--syntax-extra) (modus-themes--syntax-string, modus-themes--syntax-comment) (modus-themes--heading, modus-themes--agenda-structure) (modus-themes--agenda-date, modus-themes--mode-line-attrs) (modus-themes--completion, modus-themes--link, modus-themes--link-color) (modus-themes--region, modus-themes--hl-line, modus-themes--button): Make private functions check for the desired value. Refine them where necessary. (modus-themes-faces, modus-themes-custom-variables): Update supported faces and relevant variables. --- diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org index 70f1e8bd1de..42ad3ee35fe 100644 --- a/doc/misc/modus-themes.org +++ b/doc/misc/modus-themes.org @@ -5,9 +5,9 @@ #+options: ':t toc:nil author:t email:t num:t #+startup: content -#+macro: stable-version 2.2.0 -#+macro: release-date 2022-02-23 -#+macro: development-version 2.3.0-dev +#+macro: stable-version 2.3.0 +#+macro: release-date 2022-04-01 +#+macro: development-version 2.4.0-dev #+macro: file @@texinfo:@file{@@$1@@texinfo:}@@ #+macro: space @@texinfo:@: @@ #+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@ @@ -15,7 +15,7 @@ #+texinfo_filename: modus-themes.info #+texinfo_dir_category: Emacs misc features #+texinfo_dir_title: Modus Themes: (modus-themes) -#+texinfo_dir_desc: Highly accessible themes (WCAG AAA) +#+texinfo_dir_desc: Elegant, highly legible and customizable themes #+texinfo_header: @set MAINTAINERSITE @uref{https://protesilaos.com,maintainer webpage} #+texinfo_header: @set MAINTAINER Protesilaos Stavrou #+texinfo_header: @set MAINTAINEREMAIL @email{info@protesilaos.com} @@ -222,16 +222,16 @@ They are now ready to be used: [[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable #+cindex: Essential configuration #+vindex: modus-themes-after-load-theme-hook -Users of the built-in themes can load and automatically enable the theme -of their preference by adding either form to their init file: +Users of the built-in themes cannot ~require~ the package as usual +because there is no package to speak of. Instead, things are simpler as +all one needs is to load the theme of their preference by adding either +form to their init file: #+begin_src emacs-lisp (load-theme 'modus-operandi) ; Light theme (load-theme 'modus-vivendi) ; Dark theme #+end_src -This is all one needs. - 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 main library before loading either theme: @@ -260,24 +260,39 @@ a theme with either of the following expressions: Changes to the available customization options must always be evaluated before loading a theme ([[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization Options]]). An exception to this norm is when using the various Custom interfaces or with commands like -{{{kbd(M-x customize-set-variable)}}}, which can automatically reload -the theme ([[#h:9001527a-4e2c-43e0-98e8-3ef72d770639][Option for inhibiting theme reload]]). This is how a basic -setup could look like: +{{{kbd(M-x customize-set-variable)}}}, which can optionally +automatically reload the theme ([[#h:9001527a-4e2c-43e0-98e8-3ef72d770639][Option for inhibiting theme reload]]). + +This is how a basic setup could look like: #+begin_src emacs-lisp +;;; For the built-in themes which cannot use `require': +;; Add all your customizations prior to loading the themes +(setq modus-themes-italic-constructs t + modus-themes-bold-constructs nil + modus-themes-region '(bg-only no-extend)) + +;; Load the theme of your choice: +(load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi) + +(define-key global-map (kbd "") #'modus-themes-toggle) + + + +;;; For packaged versions which must use `require': (require 'modus-themes) -;; Your customisations here. For example: -(setq modus-themes-bold-constructs t - modus-themes-mode-line '3d) +;; Add all your customizations prior to loading the themes +(setq modus-themes-italic-constructs t + modus-themes-bold-constructs nil + modus-themes-region '(bg-only no-extend)) -;; Load the theme files before enabling a theme (else you get an error). +;; Load the theme files before enabling a theme (modus-themes-load-themes) -;; Enable the theme of your preference: -(modus-themes-load-operandi) +;; Load the theme of your choice: +(modus-themes-load-operandi) ;; OR (modus-themes-load-vivendi) -;; Optionally add a key binding for the toggle between the themes: (define-key global-map (kbd "") #'modus-themes-toggle) #+end_src @@ -307,15 +322,30 @@ It is common for Emacs users to rely on ~use-package~ for declaring package configurations in their setup. We use this as an example: #+begin_src emacs-lisp +;;; For the built-in themes which cannot use `require': +(use-package emacs + :init + ;; Add all your customizations prior to loading the themes + (setq modus-themes-italic-constructs t + modus-themes-bold-constructs nil + modus-themes-region '(bg-only no-extend)) + :config + ;; Load the theme of your choice: + (load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi) + :bind ("" . modus-themes-toggle) + + + +;;; For packaged versions which must use `require': (use-package modus-themes - :ensure ; omit this to use the built-in themes + :ensure :init ;; Add all your customizations prior to loading the themes (setq modus-themes-italic-constructs t modus-themes-bold-constructs nil modus-themes-region '(bg-only no-extend)) - ;; Load the theme files before enabling a theme (else you get an error). + ;; Load the theme files before enabling a theme (modus-themes-load-themes) :config ;; Load the theme of your choice: @@ -326,6 +356,20 @@ package configurations in their setup. We use this as an example: The same without ~use-package~: #+begin_src emacs-lisp +;;; For the built-in themes which cannot use `require': +;; Add all your customizations prior to loading the themes +(setq modus-themes-italic-constructs t + modus-themes-bold-constructs nil + modus-themes-region '(bg-only no-extend)) + +;; Load the theme of your choice: +(load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi) + +(define-key global-map (kbd "") #'modus-themes-toggle) + + + +;;; For packaged versions which must use `require': (require 'modus-themes) ;; Add all your customizations prior to loading the themes @@ -418,6 +462,7 @@ this manual. modus-themes-bold-constructs nil modus-themes-mixed-fonts nil modus-themes-subtle-line-numbers nil + modus-themes-intense-mouseovers nil modus-themes-deuteranopia t modus-themes-tabs-accented t modus-themes-variable-pitch-ui nil @@ -433,8 +478,14 @@ this manual. ;; Options for `modus-themes-mode-line' are either nil, or a list ;; that can combine any of `3d' OR `moody', `borderless', - ;; `accented', and a natural number for extra padding - modus-themes-mode-line '(4 accented borderless) + ;; `accented', a natural number for extra padding (or a cons cell + ;; of padding and NATNUM), and a floating point for the height of + ;; the text relative to the base font size (or a cons cell of + ;; height and FLOAT) + modus-themes-mode-line '(accented borderless (padding . 4) (height . 0.9)) + + ;; Same as above: + ;; modus-themes-mode-line '(accented borderless 4 0.9) ;; Options for `modus-themes-markup' are either nil, or a list ;; that can combine any of `bold', `italic', `background', @@ -464,9 +515,10 @@ this manual. ;; Options for `modus-themes-box-buttons' are either nil (the ;; default), or a list that can combine any of `flat', `accented', - ;; `faint', `variable-pitch', `underline', the symbol of any font - ;; weight as listed in `modus-themes-weights', and a floating - ;; point number (e.g. 0.9) for the height of the button's text. + ;; `faint', `variable-pitch', `underline', `all-buttons', the + ;; symbol of any font weight as listed in `modus-themes-weights', + ;; and a floating point number (e.g. 0.9) for the height of the + ;; button's text. modus-themes-box-buttons '(variable-pitch flat faint 0.9) ;; Options for `modus-themes-prompts' are either nil (the @@ -479,8 +531,8 @@ this manual. ;; value (or empty list) or a list of properties that can include ;; any of the following (for WEIGHT read further below): ;; - ;; `key' - `background', `intense', `underline', `italic', WEIGHT - ;; `selection' - `accented', `intense', `underline', `italic', WEIGHT + ;; `matches' - `background', `intense', `underline', `italic', WEIGHT + ;; `selection' - `accented', `intense', `underline', `italic', `text-also' WEIGHT ;; `popup' - same as `selected' ;; `t' - applies to any key not explicitly referenced (check docs) ;; @@ -841,7 +893,9 @@ an empty list). The list can include any of the following symbols: - ~heavy~ - ~extrabold~ - ~ultrabold~ -+ A floating point as a height multiple of the default (e.g. =0.9=) ++ A floating point as a height multiple of the default or a cons cell in + the form of =(height . FLOAT)= ++ ~all-buttons~ The default (a nil value or an empty list) is a gray background combined with a pseudo three-dimensional effect. @@ -873,6 +927,14 @@ defined in the variable ~modus-themes-weights~. A number, expressed as a floating point (e.g. =0.9=), adjusts the height of the button's text to that many times the base font size. The default height is the same as =1.0=, though it need not be explicitly stated. +Instead of a floating point, an acceptable value can be in the form of a +cons cell like =(height . FLOAT)= or =(height FLOAT)=, where FLOAT is +the given number. + +The ~all-buttons~ property extends the box button effect (or the +aforementioned properties) to the faces of the generic widget library. +By default, those do not look like the buttons of the Custom UI as they +are ordinary text wrapped in square brackets. Combinations of any of those properties are expressed as a list, like in these examples: @@ -880,7 +942,9 @@ like in these examples: #+begin_src emacs-lisp (flat) (variable-pitch flat) -(variable-pitch flat 0.9 semibold) +(variable-pitch flat semibold 0.9) +(variable-pitch flat semibold (height 0.9)) ; same as above +(variable-pitch flat semibold (height . 0.9)) ; same as above #+end_src The order in which the properties are set is not significant. @@ -970,7 +1034,10 @@ effect, color, and border visibility: - ~moody~ + ~accented~ + ~borderless~ -+ A natural number > 1 for extra padding ++ A natural number > 1 for extra padding or a cons cell in the form of + ~(padding . NATNUM)~. ++ A floating point to set the height of the mode line's text. It can + also be a cons cell in the form of ~(height . FLOAT)~. The default (a nil value or an empty list) is a two-dimensional rectangle with a border around it. The active and the inactive mode @@ -1006,6 +1073,17 @@ bottom of the mode line, set ~x-underline-at-descent-line~ to non-nil users on Emacs 29, the ~x-use-underline-position-properties~ variable must also be set to nil. +The padding can also be expressed as a cons cell in the form of +=(padding . NATNUM)= or =(padding NATNUM)= where the key is constant and +NATNUM is the desired natural number. + +A floating point applies an adjusted height to the mode line's text as a +multiple of the main font size. The default rate is 1.0 and does not +need to be specified. Apart from a floating point, the height may also +be expressed as a cons cell in the form of =(height . FLOAT)= or +=(height FLOAT)= where the key is constant and the FLOAT is the desired +number. + Combinations of any of those properties are expressed as a list, like in these examples: @@ -1015,6 +1093,15 @@ these examples: (moody accented borderless) #+end_src +Same as above, using the padding and height as an example (these +all yield the same result): + +#+begin_src emacs-lisp +(accented borderless 4 0.9) +(accented borderless (padding . 4) (height . 0.9)) +(accented borderless (padding 4) (height 0.9)) +#+end_src + The order in which the properties are set is not significant. In user configuration files the form may look like this: @@ -1117,12 +1204,14 @@ appear in: The ~selection~ key applies to the current line or currently matched candidate, depending on the specifics of the User Interface. By default -(nil or an empty list), it has a subtle gray background and a bold -weight. The list of properties it accepts is as follows (order is not -significant): +(nil or an empty list), it has a subtle gray background, a bold weight, +and the base foreground value for the text. The list of properties it +accepts is as follows (order is not significant): - ~accented~ to make the background colorful instead of gray; +- ~text-also~ to apply extra color to the text of the selected line; + - ~intense~ to increase the overall coloration; - ~underline~ to draw a line below the characters; @@ -1154,8 +1243,9 @@ Is the same as: #+end_src In the case of the fallback, any property that does not apply to the -corresponding key is simply ignored (~matches~ does not have ~accented~, -~selection~ and ~popup~ do not have ~background~). +corresponding key is simply ignored (~matches~ does not have ~accented~ +and ~text-also~, while ~selection~ and ~popup~ do not have +~background~). A concise expression of those associations can be written as follows, where the ~car~ is always the key and the ~cdr~ is the list of @@ -1389,6 +1479,29 @@ Instead they retain the primary background of the theme, blending with the rest of the buffer. Foreground values for all relevant faces are updated to accommodate this aesthetic. +** Option for mouseover effects +:properties: +:alt_title: Mouse hover effects +:description: Toggle intense style for mouseover highlights +:custom_id: h:9b869620-fcc5-4b5f-9ab8-225d73b7f22f +:end: +#+vindex: modus-themes-intense-mouseovers + +Brief: Toggle intense mouse hover effects. + +Symbol: ~modus-themes-intense-mouseovers~ (=boolean= type) + +Possible value: + +1. ~nil~ (default) +2. ~t~ + +By default all mouseover effects apply a highlight with a subtle colored +background. When non-nil, these have a more pronounced effect. + +Note that this affects the generic ~highlight~ which, strictly speaking, +is not limited to mouse usage. + ** Option for markup style in Org and others :properties: :alt_title: Markup @@ -1674,12 +1787,18 @@ come in the form of a list that can include either or both of those properties: - ~variable-pitch~ to use a proportionately spaced typeface; + - A number as a floating point (e.g. 1.5) to set the height of the text to that many times the default font height. A float of 1.0 or the - symbol ~no-scale~ have the same effect of making the font to the same - height as the rest of the buffer. When neither a number nor ~no-scale~ - are present, the default is a small increase in height (a value of - 1.15). + symbol ~no-scale~ have the same effect of making the font the same + height as the rest of the buffer. When neither a number nor + `no-scale' are present, the default is a small increase in height (a + value of 1.15). + + Instead of a floating point, an acceptable value can be in the form of + a cons cell like =(height . FLOAT)= or =(height FLOAT)=, where FLOAT + is the given number. + - The symbol of a weight attribute adjusts the font of the heading accordingly, such as ~light~, ~semibold~, etc. Valid symbols are defined in the variable ~modus-themes-weights~. The absence of a @@ -1709,16 +1828,24 @@ the following properties: - ~grayscale~ to make weekdays use the main foreground color and weekends a more subtle gray; + - ~workaholic~ to make weekdays and weekends look the same in terms of color; + - ~bold-today~ to apply a bold typographic weight to the current date; + - ~bold-all~ to render all date headings in a bold weight; + - ~underline-today~ applies an underline to the current date while removing the background it has by default; + - A number as a floating point (e.g. 1.2) to set the height of the text to that many times the default font height. The default is the same - as the base font height (the equivalent of 1.0). + as the base font height (the equivalent of 1.0). Instead of a + floating point, an acceptable value can be in the form of a cons cell + like =(height . FLOAT)= or =(height FLOAT)=, where FLOAT is the given + number. For example: @@ -1805,7 +1932,7 @@ passed as a symbol. Those are: attenuated by painting both of them using shades of green. This option thus highlights the alert and overdue states. - When ~modus-themes-deuteranopia~ is non-nil the exact style of the habit - graph adapts to the needs of users with red-green colour deficiency by + graph adapts to the needs of users with red-green color deficiency by substituting every instance of green with blue or cyan (depending on the specifics). @@ -1884,7 +2011,8 @@ Properties: - ~extrabold~ - ~ultrabold~ + ~no-bold~ (deprecated alias of a ~regular~ weight) -+ A floating point as a height multiple of the default (e.g. =1.1=) ++ A floating point as a height multiple of the default or a cons cell in + the form of =(height . FLOAT)=. By default (a ~nil~ value for this variable), all headings have a bold typographic weight and use a desaturated text color. @@ -1916,6 +2044,9 @@ users are encouraged to specify a ~regular~ weight instead. A number, expressed as a floating point (e.g. 1.5), adjusts the height of the heading to that many times the base font size. The default height is the same as 1.0, though it need not be explicitly stated. +Instead of a floating point, an acceptable value can be in the form of a +cons cell like =(height . FLOAT)= or =(height FLOAT)=, where FLOAT is +the given number. Combinations of any of those properties are expressed as a list, like in these examples: @@ -1924,6 +2055,8 @@ these examples: (semibold) (rainbow background) (overline monochrome semibold 1.3) +(overline monochrome semibold (height 1.3)) ; same as above +(overline monochrome semibold (height . 1.3)) ; same as above #+end_src The order in which the properties are set is not significant. @@ -2032,6 +2165,77 @@ Another example that can be bound to a key: : TERM=xterm-direct uxterm -e emacsclient -nw +** Range of color with terminal emulators +:PROPERTIES: +:CUSTOM_ID: h:6b8211b0-d11b-4c00-9543-4685ec3b742f +:END: +#+cindex: Pure white and pure black in terminal emulators + +[ This is based on partial information. Please help verify and/or + expand these findings. ] + +When Emacs runs in a non-windowed session its color reproduction +capacity is framed or determined by the underlying terminal emulator +([[#h:fbb5e254-afd6-4313-bb05-93b3b4f67358][More accurate colors in terminal emulators]]). Emacs cannot produce a +color that lies outside the range of what the terminal's color palette +renders possible. + +This is immediately noticeable when the terminal's first 16 codes do not +include a pure black value for the =termcol0= entry and a pure white for +=termcol15=. Emacs cannot set the correct background (white for +~modus-operandi~; black for ~modus-vivendi~) or foreground (inverse of +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: + +#+begin_src emacs-lisp +! Theme: modus-operandi +! Description: XTerm port of modus-operandi (Modus themes for GNU Emacs) +! Author: Protesilaos Stavrou, +xterm*background: #ffffff +xterm*foreground: #000000 +xterm*color0: #000000 +xterm*color1: #a60000 +xterm*color2: #005e00 +xterm*color3: #813e00 +xterm*color4: #0031a9 +xterm*color5: #721045 +xterm*color6: #00538b +xterm*color7: #bfbfbf +xterm*color8: #595959 +xterm*color9: #972500 +xterm*color10: #315b00 +xterm*color11: #70480f +xterm*color12: #2544bb +xterm*color13: #5317ac +xterm*color14: #005a5f +xterm*color15: #ffffff + +! Theme: modus-vivendi +! Description: XTerm port of modus-vivendi (Modus themes for GNU Emacs) +! Author: Protesilaos Stavrou, +xterm*background: #000000 +xterm*foreground: #ffffff +xterm*color0: #000000 +xterm*color1: #ff8059 +xterm*color2: #44bc44 +xterm*color3: #d0bc00 +xterm*color4: #2fafff +xterm*color5: #feacd0 +xterm*color6: #00d3d0 +xterm*color7: #bfbfbf +xterm*color8: #595959 +xterm*color9: #ef8b50 +xterm*color10: #70b900 +xterm*color11: #c0c530 +xterm*color12: #79a8ff +xterm*color13: #b6a0ff +xterm*color14: #6ae4b9 +xterm*color15: #ffffff +#+end_src + ** Visualize the active Modus theme's palette :properties: :custom_id: h:f4d4b71b-2ca5-4c3d-b0b4-9bfd7aa7fb4d @@ -2553,7 +2757,7 @@ The themes provide a mechanism for overriding their color values. This is controlled by the variables ~modus-themes-operandi-color-overrides~ and ~modus-themes-vivendi-color-overrides~, which are alists that should mirror a subset of the associations in ~modus-themes-operandi-colors~ and -~modus-themes-vivendi-colors~ respectively. As with all customisations, +~modus-themes-vivendi-colors~ respectively. As with all customizations, overriding must be done before loading the affected theme. [[#h:f4d4b71b-2ca5-4c3d-b0b4-9bfd7aa7fb4d][Visualize the active Modus theme's palette]]. @@ -2659,7 +2863,7 @@ Operandi and night sky blue shades for Modus Vivendi. Switching between the two themes, such as with {{{kbd(M-x modus-themes-toggle)}}} will also use the overrides. -Given that this is a user-level customisation, one is free to implement +Given that this is a user-level customization, one is free to implement whatever color values they desire, even if the possible combinations fall below the minimum 7:1 contrast ratio that governs the design of the themes (the WCAG AAA legibility standard). Alternatively, this can also @@ -3720,6 +3924,135 @@ coloration. [[#h:f4d4b71b-2ca5-4c3d-b0b4-9bfd7aa7fb4d][Visualize the active Modus theme's palette]]. +** Near-monochrome syntax highlighting +:properties: +:custom_id: h:c1f3fa8e-7a63-4a6f-baf3-a7febc0661f0 +:end: +#+cindex: Monochrome code syntax + +While the Modus themes do provide a user option to control the overall +style of syntax highlighting in programming major modes, they do not +cover the possibility of a monochromatic or near-monochromatic design +([[#h:c119d7b2-fcd4-4e44-890e-5e25733d5e52][Option for syntax highlighting]]). This is due to the multitude of +preferences involved: one may like comments to be styled with an accent +value, another may want certain constructs to be bold, a third may apply +italics to doc strings but not comments... The possibilities are +virtually endless. As such, this sort of design is best handled at the +user level in accordance with the information furnished elsewhere in +this manual. + +[[#h:1487c631-f4fe-490d-8d58-d72ffa3bd474][Case-by-case face specs using the themes' palette]]. + +[[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]]. + +The gist is that we want to override the font-lock faces. For our +changes to persist while switching between ~modus-operandi~ and +~modus-vivendi~ we wrap our face overrides in a function that we hook to +~modus-themes-after-load-theme-hook~. + +Users who want to replicate the structure of the themes' source code are +advised to use the examples with ~custom-set-faces~. Those who prefer a +different approach can use the snippets which call ~set-face-attribute~. +Below are the code blocks. + +The following uses a yellow accent value for comments and green hues for +strings. Regexp grouping constructs have color values that work in the +context of a green string. All other elements use the main foreground +color, except warnings such as the ~user-error~ function in Elisp +buffers which gets a subtle red tint (not to be confused with the +~warning~ face which is used for genuine warnings). Furthermore, notice +the ~modus-themes-bold~ and ~modus-themes-slant~ which apply the +preference set in the user options ~modus-themes-bold-constructs~ and +~modus-themes-italic-constructs~, respectively. Users who do not want +this conditionally must replace these faces with ~bold~ and ~italic~ +respectively (or ~unspecified~ to disable the effect altogether). + +#+begin_src emacs-lisp +;; This is the hook. It will not be replicated across all code samples. +(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-subtle-syntax) + +(defun my-modus-themes-subtle-syntax () + (modus-themes-with-colors + (custom-set-faces + `(font-lock-builtin-face ((,class :inherit modus-themes-bold :foreground unspecified))) + `(font-lock-comment-delimiter-face ((,class :inherit font-lock-comment-face))) + `(font-lock-comment-face ((,class :inherit unspecified :foreground ,fg-comment-yellow))) + `(font-lock-constant-face ((,class :foreground unspecified))) + `(font-lock-doc-face ((,class :inherit modus-themes-slant :foreground ,fg-special-mild))) + `(font-lock-function-name-face ((,class :foreground unspecified))) + `(font-lock-keyword-face ((,class :inherit modus-themes-bold :foreground unspecified))) + `(font-lock-negation-char-face ((,class :inherit modus-themes-bold :foreground unspecified))) + `(font-lock-preprocessor-face ((,class :foreground unspecified))) + `(font-lock-regexp-grouping-backslash ((,class :inherit bold :foreground ,yellow))) + `(font-lock-regexp-grouping-construct ((,class :inherit bold :foreground ,blue-alt-other))) + `(font-lock-string-face ((,class :foreground ,green-alt-other))) + `(font-lock-type-face ((,class :inherit modus-themes-bold :foreground unspecified))) + `(font-lock-variable-name-face ((,class :foreground unspecified))) + `(font-lock-warning-face ((,class :inherit modus-themes-bold :foreground ,red-nuanced-fg)))))) + +;; Same as above with `set-face-attribute' instead of `custom-set-faces' +(defun my-modus-themes-subtle-syntax () + (modus-themes-with-colors + (set-face-attribute 'font-lock-builtin-face nil :inherit 'modus-themes-bold :foreground 'unspecified) + (set-face-attribute 'font-lock-comment-delimiter-face nil :inherit 'font-lock-comment-face) + (set-face-attribute 'font-lock-comment-face nil :inherit 'unspecified :foreground fg-comment-yellow) + (set-face-attribute 'font-lock-constant-face nil :foreground 'unspecified) + (set-face-attribute 'font-lock-doc-face nil :inherit 'modus-themes-slant :foreground fg-special-mild) + (set-face-attribute 'font-lock-function-name-face nil :foreground 'unspecified) + (set-face-attribute 'font-lock-keyword-face nil :inherit 'modus-themes-bold :foreground 'unspecified) + (set-face-attribute 'font-lock-negation-char-face nil :inherit 'modus-themes-bold :foreground 'unspecified) + (set-face-attribute 'font-lock-preprocessor-face nil :foreground 'unspecified) + (set-face-attribute 'font-lock-regexp-grouping-backslash nil :inherit 'bold :foreground yellow) + (set-face-attribute 'font-lock-regexp-grouping-construct nil :inherit 'bold :foreground blue-alt-other) + (set-face-attribute 'font-lock-string-face nil :foreground green-alt-other) + (set-face-attribute 'font-lock-type-face nil :inherit 'modus-themes-bold :foreground 'unspecified) + (set-face-attribute 'font-lock-variable-name-face nil :foreground 'unspecified) + (set-face-attribute 'font-lock-warning-face nil :inherit 'modus-themes-bold :foreground red-nuanced-fg))) +#+end_src + +The following sample is the same as above, except strings are blue and +comments are gray. Regexp constructs are adapted accordingly. + +#+begin_src emacs-lisp +(defun my-modus-themes-subtle-syntax () + (modus-themes-with-colors + (custom-set-faces + `(font-lock-builtin-face ((,class :inherit modus-themes-bold :foreground unspecified))) + `(font-lock-comment-delimiter-face ((,class :inherit font-lock-comment-face))) + `(font-lock-comment-face ((,class :inherit unspecified :foreground ,fg-alt))) + `(font-lock-constant-face ((,class :foreground unspecified))) + `(font-lock-doc-face ((,class :inherit modus-themes-slant :foreground ,fg-docstring))) + `(font-lock-function-name-face ((,class :foreground unspecified))) + `(font-lock-keyword-face ((,class :inherit modus-themes-bold :foreground unspecified))) + `(font-lock-negation-char-face ((,class :inherit modus-themes-bold :foreground unspecified))) + `(font-lock-preprocessor-face ((,class :foreground unspecified))) + `(font-lock-regexp-grouping-backslash ((,class :inherit bold :foreground ,fg-escape-char-backslash))) + `(font-lock-regexp-grouping-construct ((,class :inherit bold :foreground ,fg-escape-char-construct))) + `(font-lock-string-face ((,class :foreground ,blue-alt))) + `(font-lock-type-face ((,class :inherit modus-themes-bold :foreground unspecified))) + `(font-lock-variable-name-face ((,class :foreground unspecified))) + `(font-lock-warning-face ((,class :inherit modus-themes-bold :foreground ,red-nuanced-fg)))))) + +;; Same as above with `set-face-attribute' instead of `custom-set-faces' +(defun my-modus-themes-subtle-syntax () + (modus-themes-with-colors + (set-face-attribute 'font-lock-builtin-face nil :inherit 'modus-themes-bold :foreground 'unspecified) + (set-face-attribute 'font-lock-comment-delimiter-face nil :inherit 'font-lock-comment-face) + (set-face-attribute 'font-lock-comment-face nil :inherit 'unspecified :foreground fg-alt) + (set-face-attribute 'font-lock-constant-face nil :foreground 'unspecified) + (set-face-attribute 'font-lock-doc-face nil :inherit 'modus-themes-slant :foreground fg-docstring) + (set-face-attribute 'font-lock-function-name-face nil :foreground 'unspecified) + (set-face-attribute 'font-lock-keyword-face nil :inherit 'modus-themes-bold :foreground 'unspecified) + (set-face-attribute 'font-lock-negation-char-face nil :inherit 'modus-themes-bold :foreground 'unspecified) + (set-face-attribute 'font-lock-preprocessor-face nil :foreground 'unspecified) + (set-face-attribute 'font-lock-regexp-grouping-backslash nil :inherit 'bold :foreground fg-escape-char-backslash) + (set-face-attribute 'font-lock-regexp-grouping-construct nil :inherit 'bold :foreground fg-escape-char-construct) + (set-face-attribute 'font-lock-string-face nil :foreground blue-alt) + (set-face-attribute 'font-lock-type-face nil :inherit 'modus-themes-bold :foreground 'unspecified) + (set-face-attribute 'font-lock-variable-name-face nil :foreground 'unspecified) + (set-face-attribute 'font-lock-warning-face nil :inherit 'modus-themes-bold :foreground red-nuanced-fg))) +#+end_src + * Face coverage :properties: :custom_id: h:a9c8f29d-7f72-4b54-b74b-ddefe15d6a19 @@ -3793,6 +4126,7 @@ have lots of extensions, so the "full support" may not be 100% true… + deadgrep + debbugs + deft ++ devdocs + dictionary + diff-hl + diff-mode @@ -3914,6 +4248,7 @@ have lots of extensions, so the "full support" may not be 100% true… + mct + mentor + messages ++ mini-modeline + minimap + mmm-mode + mode-line @@ -4063,6 +4398,7 @@ supported by the themes. + dtache + easy-kill + edit-indirect ++ elfeed-summary + evil-owl + flyspell-correct + fortran-mode @@ -4083,6 +4419,7 @@ supported by the themes. + swift-mode + tab-bar-echo-area + tide ++ undo-hl + vdiff + vertico-indexed + vertico-mouse @@ -4239,29 +4576,20 @@ package: it draws too much attention to unfocused windows. :custom_id: h:2a602816-bc1b-45bf-9675-4cbbd7bf6cab :end: -While designing the style for ~display-fill-column-indicator-mode~, we -stayed close to the mode's defaults: to apply a subtle foreground color -to the ~fill-column-indicator~ face, which blends well with the rest of -theme and is consistent with the role of that mode. This is to not -upset the expectations of users. - -Nevertheless, ~display-fill-column-indicator-mode~ has some known -limitations pertaining to its choice of using typographic characters to -draw its indicator. What should be a continuous vertical line might -appear as a series of dashes in certain contexts or under specific -conditions: a non-default value for ~line-spacing~, scaled and/or -variable-pitch headings have been observed to cause this effect. +The ~display-fill-column-indicator-mode~ uses a typographic character to +draw its line. This has the downside of creating a dashed line. The +dashes are further apart depending on how tall the font's glyph height +is and what integer the ~line-spacing~ is set to. -Given that we cannot control such factors, it may be better for affected -users to deviate from the default style of the ~fill-column-indicator~ -face. Instead of setting a foreground color, one could use a background -and have the foreground be indistinguishable from it. For example: +At the theme level we eliminate this effect by making the character one +pixel tall: the line is contiguous. Users who prefer the dashed line +are advised to change the ~fill-column-indicator~ face, as explained +elsewhere in this document. For example: #+begin_src emacs-lisp (modus-themes-with-colors (custom-set-faces - `(fill-column-indicator ((,class :background ,bg-inactive - :foreground ,bg-inactive))))) + `(fill-column-indicator ((,class :foreground ,bg-active))))) #+end_src [[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]]. @@ -4456,7 +4784,7 @@ implements an alternative to the typical coloration of code. Instead of highlighting the syntactic constructs, it applies color to different levels of depth in the code structure. -As {{{file(prism.el)}}} offers a broad range of customisations, we cannot +As {{{file(prism.el)}}} offers a broad range of customizations, we cannot style it directly at the theme level: that would run contrary to the spirit of the package. Instead, we may offer preset color schemes. Those should offer a starting point for users to adapt to their needs. @@ -4644,7 +4972,7 @@ Emacs' HTML rendering library ({{{file(shr.el)}}}) may need explicit configuration to respect the theme's colors instead of whatever specifications the webpage provides. -Consult {{{kbd(C-h v shr-use-colors)}}}. +Consult the doc string of ~shr-use-colors~. ** Note on SHR fonts :properties: @@ -4806,6 +5134,20 @@ you've customized any faces. "-draw" "text %X,%Y '%c'")))) #+end_src +** Note on the Notmuch logo +:properties: +:custom_id: h:636af312-54a5-4918-84a6-0698e85a3c6d +:end: + +By default, the "hello" buffer of Notmuch includes a header with the +programs' logo and a couple of buttons. The logo has the effect of +enlarging the height of the line, which negatively impacts the shape of +those buttons. Disabling the logo fixes the problem: + +#+begin_src emacs-lisp +(setq notmuch-show-logo nil) +#+end_src + * Frequently Asked Questions :properties: :custom_id: h:b3384767-30d3-4484-ba7f-081729f03a47 @@ -5124,8 +5466,8 @@ themes remains consistent. The former criterion should be crystal clear as it pertains to the scientific foundations of the themes: high legibility and taking care of -the needs of users with red-green colour deficiency (deuteranopia) by -avoiding red+green colour coding paradigms and/or by providing red+blue +the needs of users with red-green color deficiency (deuteranopia) by +avoiding red+green color coding paradigms and/or by providing red+blue variants. The latter criterion is the "je ne sais quoi" of the artistic aspect of @@ -5143,7 +5485,7 @@ but try to understand its spirit. For a trivial example: the curly underline that Emacs draws for spelling errors is thinner than, e.g., what a graphical web browser has, so if I was to design for an editor than has a thicker curly underline I would -make the applicable colours less intense to counterbalance the +make the applicable colors less intense to counterbalance the typographic intensity of the added thickness. With those granted, if anyone is willing to develop a port of the @@ -5166,8 +5508,8 @@ in which you can contribute to their ongoing development. The ~modus-operandi~ and ~modus-vivendi~ themes are built into Emacs 28. -The source code of the themes is [[https://gitlab.com/protesilaos/modus-themes/][available on Gitlab]], for the time -being. A [[https://github.com/protesilaos/modus-themes/][mirror on Github]] is also on offer. +The source code of the themes is [[https://gitlab.com/protesilaos/modus-themes/][available on GitLab]], for the time +being. A [[https://github.com/protesilaos/modus-themes/][mirror on GitHub]] is also on offer. An HTML version of this manual is provided as an extension of the [[https://protesilaos.com/emacs/modus-themes/][author's personal website]] (does not rely on any non-free code). @@ -5274,37 +5616,39 @@ The Modus themes are a collective effort. Every bit of work matters. + Author/maintainer :: Protesilaos Stavrou. + Contributions to code or documentation :: Alex Griffin, Anders - Johansson, Basil L.{{{space()}}} Contovounesios, Björn Lindström, Carlo - Zancanaro, Christian Tietze, Daniel Mendler, Eli Zaretskii, Fritz - Grabo, Illia Ostapyshyn, Kévin Le Gouguec, Kostadin Ninev, Madhavan - Krishnan, Markus Beppler, Matthew Stevenson, Mauro Aranda, Nicolas De - Jaeghere, Philip Kaludercic, Rudolf Adamkovič, Stephen Gildea, Shreyas - Ragavan, Stefan Kangas, Utkarsh Singh, Vincent Murphy, Xinglu Chen, - Yuanchen Xie. + Johansson, Basil L.{{{space()}}} Contovounesios, Björn Lindström, + Carlo Zancanaro, Christian Tietze, Daniel Mendler, Eli Zaretskii, + Fritz Grabo, Illia Ostapyshyn, Kévin Le Gouguec, Kostadin Ninev, + Madhavan Krishnan, Markus Beppler, Matthew Stevenson, Mauro Aranda, + Nicolas De Jaeghere, Philip Kaludercic, Pierre Téchoueyres, Rudolf + Adamkovič, Stephen Gildea, Shreyas Ragavan, Stefan Kangas, Utkarsh + Singh, Vincent Murphy, Xinglu Chen, Yuanchen Xie. + Ideas and user feedback :: Aaron Jensen, Adam Porter, Adam Spiers, Adrian Manea, Alex Griffin, Alex Koen, Alex Peitsinis, Alexey Shmalko, - Alok Singh, Anders Johansson, André Alexandre Gomes, Arif Rezai, Basil - L.{{{space()}}} Contovounesios, Burgess Chang, Christian Tietze, - Christopher Dimech, Damien Cassou, Daniel Mendler, Dario Gjorgjevski, - David Edmondson, Davor Rotim, Divan Santana, Eliraz Kedmi, Emanuele - Michele Alberto Monterosso, Farasha Euker, Feng Shu, Gautier Ponsinet, - Gerry Agbobada, Gianluca Recchia, Guilherme Semente, Gustavo Barros, - Hörmetjan Yiltiz, Ilja Kocken, Iris Garcia, Jeremy Friesen, Jerry - Zhang, Johannes Grødem, John Haman, Joshua O'Connor, Kenta Usami, - Kevin Fleming, Kévin Le Gouguec, Kostadin Ninev, Len Trigg, Magne Hov, - Manuel Uberti, Mark Bestley, Mark Burton, Markus Beppler, Mauro - Aranda, Michael Goldenberg, Morgan Smith, Murilo Pereira, Nicky van + Alok Singh, Anders Johansson, André Alexandre Gomes, Antonio Hernández + Blas, Arif Rezai, Augusto Stoffel, Basil L.{{{space()}}} + Contovounesios, Burgess Chang, Christian Tietze, Christopher Dimech, + Damien Cassou, Daniel Mendler, Dario Gjorgjevski, David Edmondson, + Davor Rotim, Divan Santana, Eliraz Kedmi, Emanuele Michele Alberto + Monterosso, Farasha Euker, Feng Shu, Gautier Ponsinet, Gerry Agbobada, + Gianluca Recchia, Guilherme Semente, Gustavo Barros, Hörmetjan Yiltiz, + Ilja Kocken, Iris Garcia, Jeremy Friesen, Jerry Zhang, Johannes + Grødem, John Haman, Jorge Morais, Joshua O'Connor, Julio + C. Villasante, Kenta Usami, Kevin Fleming, Kévin Le Gouguec, Kostadin + Ninev, Len Trigg, Lennart C. Karssen, Magne Hov, Manuel Uberti, Mark + Bestley, Mark Burton, Markus Beppler, Mauro Aranda, Michael + Goldenberg, Morgan Smith, Morgan Willcock, Murilo Pereira, Nicky van Foreest, Nicolas De Jaeghere, Paul Poloskov, Pengji Zhang, Pete - Kazmier, Peter Wu, Philip Kaludercic, Pierre Téchoueyres, Roman - Rudakov, Ryan Phillips, Rudolf Adamkovič, Sam Kleinman, Samuel - Culpepper, Saša Janiška, Shreyas Ragavan, Simon Pugnet, Tassilo Horn, - Thibaut Verron, Thomas Heartman, Togan Muftuoglu, Trey Merkley, Tomasz - Hołubowicz, Toon Claes, Uri Sharf, Utkarsh Singh, Vincent Foley. As - well as users: Ben, CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux, - Fredrik, Moesasji, Nick, TheBlob42, Trey, bepolymathe, bit9tream, - derek-upham, doolio, fleimgruber, gitrj95, iSeeU, jixiuf, okamsn, - pRot0ta1p. + Kazmier, Peter Wu, Philip Kaludercic, Pierre Téchoueyres, Robert + Hepple, Roman Rudakov, Ryan Phillips, Rytis Paškauskas, Rudolf + Adamkovič, Sam Kleinman, Samuel Culpepper, Saša Janiška, Shreyas + Ragavan, Simon Pugnet, Tassilo Horn, Thibaut Verron, Thomas Heartman, + Togan Muftuoglu, Tony Zorman, Trey Merkley, Tomasz Hołubowicz, Toon + Claes, Uri Sharf, Utkarsh Singh, Vincent Foley. As well as users: + Ben, CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux, Fredrik, + Moesasji, Nick, TheBlob42, Trey, bepolymathe, bit9tream, derek-upham, + doolio, fleimgruber, gitrj95, iSeeU, jixiuf, okamsn, pRot0ta1p. + Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii, Glenn Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core Emacs), diff --git a/etc/themes/modus-operandi-theme.el b/etc/themes/modus-operandi-theme.el index f71962e3f16..be80b394102 100644 --- a/etc/themes/modus-operandi-theme.el +++ b/etc/themes/modus-operandi-theme.el @@ -1,10 +1,10 @@ -;;; modus-operandi-theme.el --- Accessible and customizable light theme (WCAG AAA) -*- lexical-binding:t -*- +;;; modus-operandi-theme.el --- Elegant, highly legible and customizable light theme -*- lexical-binding:t -*- ;; Copyright (C) 2019-2022 Free Software Foundation, Inc. ;; Author: Protesilaos Stavrou ;; URL: https://gitlab.com/protesilaos/modus-themes -;; Version: 2.2.0 +;; Version: 2.3.0 ;; Package-Requires: ((emacs "27.1")) ;; Keywords: faces, theme, accessibility @@ -56,17 +56,17 @@ (equal (file-name-directory load-file-name) (expand-file-name "themes/" data-directory)) (require-theme 'modus-themes t)) - (require 'modus-themes))) + (require 'modus-themes)) -(deftheme modus-operandi - "Accessible and customizable light theme (WCAG AAA standard). + (deftheme modus-operandi + "Elegant, highly legible and customizable light theme. Conforms with the highest legibility standard for color contrast between background and foreground in any given piece of text, which corresponds to a minimum contrast in relative luminance of -7:1.") +7:1 (WCAG AAA standard).") -(modus-themes-theme modus-operandi) + (modus-themes-theme modus-operandi) -(provide-theme 'modus-operandi) + (provide-theme 'modus-operandi)) ;;; modus-operandi-theme.el ends here diff --git a/etc/themes/modus-themes.el b/etc/themes/modus-themes.el index 067fc22ee44..adec113bd21 100644 --- a/etc/themes/modus-themes.el +++ b/etc/themes/modus-themes.el @@ -1,11 +1,11 @@ -;;; modus-themes.el --- Highly accessible and customizable themes (WCAG AAA) -*- lexical-binding:t -*- +;;; modus-themes.el --- Elegant, highly legible and customizable themes -*- lexical-binding:t -*- ;; Copyright (C) 2019-2022 Free Software Foundation, Inc. ;; Author: Protesilaos Stavrou ;; URL: https://gitlab.com/protesilaos/modus-themes -;; Version: 2.2.0 -;; Last-Modified: <2022-02-23 08:56:46 +0200> +;; Version: 2.3.0 +;; Last-Modified: <2022-04-01 12:33:34 +0300> ;; Package-Requires: ((emacs "27.1")) ;; Keywords: faces, theme, accessibility @@ -41,6 +41,7 @@ ;; modus-themes-bold-constructs (boolean) ;; modus-themes-deuteranopia (boolean) ;; modus-themes-inhibit-reload (boolean) +;; modus-themes-intense-mouseovers (boolean) ;; modus-themes-italic-constructs (boolean) ;; modus-themes-mixed-fonts (boolean) ;; modus-themes-subtle-line-numbers (boolean) @@ -123,6 +124,7 @@ ;; deadgrep ;; debbugs ;; deft +;; devdocs ;; dictionary ;; diff-hl ;; diff-mode @@ -243,6 +245,7 @@ ;; mct ;; mentor ;; messages +;; mini-modeline ;; minimap ;; mmm-mode ;; mode-line @@ -377,7 +380,10 @@ -(eval-when-compile (require 'cl-lib)) +(eval-when-compile + (require 'cl-lib) + (require 'subr-x)) +(require 'seq) (defgroup modus-themes () "Options for `modus-operandi', `modus-vivendi'. @@ -1611,17 +1617,17 @@ The actual styling of the face is done by `modus-themes-faces'." (define-obsolete-face-alias 'modus-themes-completion-standard-first-match - 'modus-themes-completion-selection + 'modus-themes-completion-selected "2.2.0") (define-obsolete-face-alias 'modus-themes-completion-standard-selected - 'modus-themes-completion-selection + 'modus-themes-completion-selected "2.2.0") (define-obsolete-face-alias 'modus-themes-completion-extra-selected - 'modus-themes-completion-selection + 'modus-themes-completion-selected "2.2.0") (define-obsolete-face-alias @@ -1737,10 +1743,7 @@ For form, see `modus-themes-vivendi-colors'." (put 'modus-themes-vivendi-color-overrides 'custom-options (copy-sequence colors))) -(define-obsolete-variable-alias - 'modus-themes-slanted-constructs - 'modus-themes-italic-constructs - "1.5.0") +(defvaralias 'modus-themes-slanted-constructs 'modus-themes-italic-constructs) (defcustom modus-themes-italic-constructs nil "Use italic font forms in more code constructs." @@ -1762,18 +1765,6 @@ For form, see `modus-themes-vivendi-colors'." :initialize #'custom-initialize-default :link '(info-link "(modus-themes) Bold constructs")) -(defcustom modus-themes-variable-pitch-headings nil - "DEPRECATED: specify `variable-pitch' in `modus-themes-headings'." - :group 'modus-themes - :package-version '(modus-themes . "1.0.0") - :version "28.1" - :type 'boolean - :set #'modus-themes--set-option - :initialize #'custom-initialize-default - :link '(info-link "(modus-themes) Headings' typeface")) - -(make-obsolete 'modus-themes-variable-pitch-headings 'modus-themes-headings "2.0.0") - (defcustom modus-themes-variable-pitch-ui nil "Use proportional fonts (variable-pitch) in UI elements. This includes the mode line, header line, tab bar, and tab line." @@ -1785,10 +1776,6 @@ This includes the mode line, header line, tab bar, and tab line." :initialize #'custom-initialize-default :link '(info-link "(modus-themes) UI typeface")) -(define-obsolete-variable-alias - 'modus-themes-no-mixed-fonts - 'modus-themes-mixed-fonts "On 2021-10-02 for version 1.7.0") - (defcustom modus-themes-mixed-fonts nil "Non-nil to enable inheritance from `fixed-pitch' in some faces. @@ -1806,6 +1793,19 @@ Users may need to explicitly configure the font family of :initialize #'custom-initialize-default :link '(info-link "(modus-themes) Mixed fonts")) +(defcustom modus-themes-intense-mouseovers nil + "When non-nil use more intense style for mouse hover effects. + +This affects the generic `highlight' face which, strictly +speaking, is not limited to mouse usage." + :group 'modus-themes + :package-version '(modus-themes . "2.3.0") + :version "29.1" + :type 'boolean + :set #'modus-themes--set-option + :initialize #'custom-initialize-default + :link '(info-link "(modus-themes) Mouse hover effects")) + (defconst modus-themes--headings-choice '(set :tag "Properties" :greedy t (const :tag "Background color" background) @@ -1823,7 +1823,11 @@ Users may need to explicitly configure the font family of (const :tag "Semi-bold" semibold) (const :tag "Extra-bold" extrabold) (const :tag "Ultra-bold" ultrabold)) - (float :tag "Number (float) to adjust height by" :value 1.1) + (radio :tag "Height" + (float :tag "Floating point to adjust height by") + (cons :tag "Cons cell of `(height . FLOAT)'" + (const :tag "The `height' key (constant)" height) + (float :tag "Floating point"))) (choice :tag "Colors" (const :tag "Subtle colors" nil) (const :tag "Rainbow colors" rainbow) @@ -1883,7 +1887,9 @@ weight instead. A number, expressed as a floating point (e.g. 1.5), adjusts the height of the heading to that many times the base font size. The default height is the same as 1.0, though it need not be -explicitly stated. +explicitly stated. Instead of a floating point, an acceptable +value can be in the form of a cons cell like (height . FLOAT) +or (height FLOAT), where FLOAT is the given number. Combinations of any of those properties are expressed as a list, like in these examples: @@ -1891,6 +1897,8 @@ like in these examples: (semibold) (rainbow background) (overline monochrome semibold 1.3) + (overline monochrome semibold (height 1.3)) ; same as above + (overline monochrome semibold (height . 1.3)) ; same as above The order in which the properties are set is not significant. @@ -1920,7 +1928,7 @@ For Org users, the extent of the heading depends on the variable and `background' properties. Depending on the version of Org, there may be others, such as `org-fontify-done-headline'." :group 'modus-themes - :package-version '(modus-themes . "2.0.0") + :package-version '(modus-themes . "2.3.0") :version "29.1" :type `(alist :options ,(mapcar (lambda (el) @@ -1954,12 +1962,18 @@ font size. Acceptable values come in the form of a list that can include either or both of those properties: - `variable-pitch' to use a proportionately spaced typeface; + - A number as a floating point (e.g. 1.5) to set the height of the text to that many times the default font height. A float of 1.0 or the symbol `no-scale' have the same effect of making - the font to the same height as the rest of the buffer. When + the font the same height as the rest of the buffer. When neither a number nor `no-scale' are present, the default is a small increase in height (a value of 1.15). + + Instead of a floating point, an acceptable value can be in the + form of a cons cell like (height . FLOAT) or (height FLOAT), + where FLOAT is the given number. + - The symbol of a weight attribute adjusts the font of the heading accordingly, such as `light', `semibold', etc. Valid symbols are defined in the variable `modus-themes-weights'. @@ -1987,17 +2001,24 @@ that can include any of the following properties: - `grayscale' to make weekdays use the main foreground color and weekends a more subtle gray; + - `workaholic' to make weekdays and weekends look the same in terms of color; + - `bold-today' to apply a bold typographic weight to the current date; + - `bold-all' to render all date headings in a bold weight; + - `underline-today' applies an underline to the current date while removing the background it has by default; + - A number as a floating point (e.g. 1.2) to set the height of the text to that many times the default font height. The default is the same as the base font height (the equivalent of - 1.0). + 1.0). Instead of a floating point, an acceptable value can be + in the form of a cons cell like (height . FLOAT) or (height + FLOAT), where FLOAT is the given number. For example: @@ -2085,7 +2106,7 @@ value are passed as a symbol. Those are: highlights the alert and overdue states. - When `modus-themes-deuteranopia' is non-nil the exact style of the habit graph adapts to the needs of users with red-green - colour deficiency by substituting every instance of green with + color deficiency by substituting every instance of green with blue or cyan (depending on the specifics). For example: @@ -2094,7 +2115,7 @@ For example: (habit . simplified) (habit . traffic-light)" :group 'modus-themes - :package-version '(modus-themes . "2.1.0") + :package-version '(modus-themes . "2.3.0") :version "29.1" :type '(set (cons :tag "Block header" @@ -2115,10 +2136,14 @@ For example: (const :tag "Semi-bold" semibold) (const :tag "Extra-bold" extrabold) (const :tag "Ultra-bold" ultrabold)) - (choice :tag "Scaling" + (radio :tag "Scaling" (const :tag "Slight increase in height (default)" nil) (const :tag "Do not scale" no-scale) - (float :tag "Number (float) to adjust height by" :value 1.3)))) + (radio :tag "Number (float) to adjust height by" + (float :tag "Just the number") + (cons :tag "Cons cell of `(height . FLOAT)'" + (const :tag "The `height' key (constant)" height) + (float :tag "Floating point")))))) (cons :tag "Date header" :greedy t (const header-date) (set :tag "Header presentation" :greedy t @@ -2126,8 +2151,12 @@ For example: (const :tag "Do not differentiate weekdays from weekends" workaholic) (const :tag "Make today bold" bold-today) (const :tag "Make all dates bold" bold-all) - (float :tag "Number (float) to adjust height by" :value 1.05) - (const :tag "Make today underlined; remove the background" underline-today))) + (const :tag "Make today underlined; remove the background" underline-today) + (radio :tag "Number (float) to adjust height by" + (float :tag "Just the number") + (cons :tag "Cons cell of `(height . FLOAT)'" + (const :tag "The `height' key (constant)" height) + (float :tag "Floating point"))))) (cons :tag "Event entry" :greedy t (const event) (set :tag "Text presentation" :greedy t @@ -2148,84 +2177,6 @@ For example: :initialize #'custom-initialize-default :link '(info-link "(modus-themes) Org agenda")) -(defcustom modus-themes-scale-headings nil - "DEPRECATED: specify height in `modus-themes-headings'." - :group 'modus-themes - :package-version '(modus-themes . "1.2.0") - :version "28.1" - :type 'boolean - :set #'modus-themes--set-option - :initialize #'custom-initialize-default) - -(make-obsolete 'modus-themes-scale-headings 'modus-themes-headings "2.0.0") - -(defcustom modus-themes-scale-1 1.05 - "DEPRECATED: specify height in `modus-themes-headings'." - :group 'modus-themes - :package-version '(modus-themes . "1.2.0") - :version "28.1" - :type 'number - :set #'modus-themes--set-option - :initialize #'custom-initialize-default) - -(make-obsolete 'modus-themes-scale-1 'modus-themes-headings "2.0.0") - -(defcustom modus-themes-scale-2 1.1 - "DEPRECATED: specify height in `modus-themes-headings'." - :group 'modus-themes - :package-version '(modus-themes . "1.2.0") - :version "28.1" - :type 'number - :set #'modus-themes--set-option - :initialize #'custom-initialize-default) - -(make-obsolete 'modus-themes-scale-2 'modus-themes-headings "2.0.0") - -(defcustom modus-themes-scale-3 1.15 - "DEPRECATED: specify height in `modus-themes-headings'." - :group 'modus-themes - :package-version '(modus-themes . "1.2.0") - :version "28.1" - :type 'number - :set #'modus-themes--set-option - :initialize #'custom-initialize-default) - -(make-obsolete 'modus-themes-scale-3 'modus-themes-headings "2.0.0") - -(defcustom modus-themes-scale-4 1.2 - "DEPRECATED: specify height in `modus-themes-headings'." - :group 'modus-themes - :package-version '(modus-themes . "1.2.0") - :version "28.1" - :type 'number - :set #'modus-themes--set-option - :initialize #'custom-initialize-default) - -(make-obsolete 'modus-themes-scale-4 'modus-themes-headings "2.0.0") - -(defcustom modus-themes-scale-title 1.3 - "DEPRECATED: specify height in `modus-themes-headings'. -Same principle for `modus-themes-org-agenda'." - :group 'modus-themes - :package-version '(modus-themes . "1.5.0") - :version "28.1" - :type 'number - :set #'modus-themes--set-option - :initialize #'custom-initialize-default) - -(make-obsolete 'modus-themes-scale-title 'modus-themes-headings "2.0.0") - -(defcustom modus-themes-scale-small 0.9 - "DEPRECATED." - :group 'modus-themes - :package-version '(modus-themes . "1.6.0") - :version "28.1" - :type 'number - :set #'modus-themes--set-option - :initialize #'custom-initialize-default) - -(make-obsolete 'modus-themes-scale-small nil "2.0.0") - (defcustom modus-themes-fringes nil "Define the visibility of fringes. @@ -2395,6 +2346,17 @@ the `borderless' property is also set). For users on Emacs 29, the `x-use-underline-position-properties' variable must also be set to nil. +The padding can also be expressed as a cons cell in the form +of (padding . NATNUM) or (padding NATNUM) where the key is +constant and NATNUM is the desired natural number. + +A floating point (e.g. 0.9) applies an adjusted height to the +mode line's text as a multiple of the main font size. The +default rate is 1.0 and does not need to be specified. Apart +from a floating point, the height may also be expressed as a cons +cell in the form of (height . FLOAT) or (height FLOAT) where the +key is constant and the FLOAT is the desired number. + Combinations of any of those properties are expressed as a list, like in these examples: @@ -2402,6 +2364,13 @@ like in these examples: (borderless 3d) (moody accented borderless) +Same as above, using the padding and height as an example (these +all yield the same result): + + (accented borderless 4 0.9) + (accented borderless (padding . 4) (height . 0.9)) + (accented borderless (padding 4) (height 0.9)) + The order in which the properties are set is not significant. In user configuration files the form may look like this: @@ -2433,8 +2402,8 @@ Furthermore, because Moody expects an underline and overline instead of a box style, it is strongly advised to set `x-underline-at-descent-line' to a non-nil value." :group 'modus-themes - :package-version '(modus-themes . "1.6.0") - :version "28.1" + :package-version '(modus-themes . "2.3.0") + :version "29.1" :type '(set :tag "Properties" :greedy t (choice :tag "Overall style" (const :tag "Rectangular Border" nil) @@ -2442,23 +2411,20 @@ instead of a box style, it is strongly advised to set (const :tag "No box effects (Moody-compatible)" moody)) (const :tag "Colored background" accented) (const :tag "Without border color" borderless) - (natnum :tag "With extra padding")) + (radio :tag "Padding" + (natnum :tag "Natural number (e.g. 4)") + (cons :tag "Cons cell of `(padding . NATNUM)'" + (const :tag "The `padding' key (constant)" padding) + (natnum :tag "Natural number"))) + (radio :tag "Height" + (float :tag "Floating point (e.g. 0.9)") + (cons :tag "Cons cell of `(height . FLOAT)'" + (const :tag "The `height' key (constant)" height) + (float :tag "Floating point")))) :set #'modus-themes--set-option :initialize #'custom-initialize-default :link '(info-link "(modus-themes) Mode line")) -(defcustom modus-themes-mode-line-padding 6 - "DEPRECATED: Set natural number in `modus-themes-mode-line'." - :group 'modus-themes - :package-version '(modus-themes . "1.7.0") - :version "29.1" - :type 'natnum - :set #'modus-themes--set-option - :initialize #'custom-initialize-default - :link '(info-link "(modus-themes) Mode line")) - -(make-obsolete 'modus-themes-mode-line-padding 'modus-themes-mode-line "2.0.0") - (defcustom modus-themes-diffs nil "Adjust the overall style of diffs. @@ -2525,11 +2491,15 @@ regardless of the order they may appear in: The `selection' key applies to the current line or currently matched candidate, depending on the specifics of the User Interface. By default (nil or an empty list), it has a subtle -gray background and a bold weight. The list of properties it -accepts is as follows (order is not significant): +gray background, a bold weight, and the base foreground value +for the text. The list of properties it accepts is as +follows (order is not significant): - `accented' to make the background colorful instead of gray; +- `text-also' to apply extra color to the text of the selected + line; + - `intense' to increase the overall coloration; - `underline' to draw a line below the characters; @@ -2560,7 +2530,8 @@ Is the same as: In the case of the fallback, any property that does not apply to the corresponding key is simply ignored (`matches' does not have -`accented', `selection' and `popup' do not have `background'). +`accented' and `text-also', while `selection' and `popup' do not +have `background'). A concise expression of those associations can be written as follows, where the `car' is always the key and the `cdr' is the @@ -2577,7 +2548,7 @@ node `(modus-themes) Configure bold and italic faces'. Also refer to the Orderless documentation for its intersection with Company (if you choose to use those in tandem)." :group 'modus-themes - :package-version '(modus-themes . "2.2.0") + :package-version '(modus-themes . "2.3.0") :version "29.1" :type `(set (cons :tag "Matches" @@ -2614,6 +2585,7 @@ with Company (if you choose to use those in tandem)." (const :tag "Semi-bold" semibold) (const :tag "Extra-bold" extrabold) (const :tag "Ultra-bold" ultrabold)) + (const :tag "Apply color to the line's text" text-also) (const :tag "With accented background" accented) (const :tag "Increased coloration" intense) (const :tag "Italic font (oblique or slanted forms)" italic) @@ -2633,6 +2605,7 @@ with Company (if you choose to use those in tandem)." (const :tag "Semi-bold" semibold) (const :tag "Extra-bold" extrabold) (const :tag "Ultra-bold" ultrabold)) + (const :tag "Apply color to the line's text" text-also) (const :tag "With accented background" accented) (const :tag "Increased coloration" intense) (const :tag "Italic font (oblique or slanted forms)" italic) @@ -2994,11 +2967,6 @@ In user configuration files the form may look like this: :initialize #'custom-initialize-default :link '(info-link "(modus-themes) Active region")) -(define-obsolete-variable-alias - 'modus-themes-success-deuteranopia - 'modus-themes-deuteranopia - "2.0.0") - (defcustom modus-themes-deuteranopia nil "When non-nil use red/blue color-coding instead of red/green. @@ -3101,14 +3069,23 @@ defined in the variable `modus-themes-weights'. A number, expressed as a floating point (e.g. 0.9), adjusts the height of the button's text to that many times the base font size. The default height is the same as 1.0, though it need not -be explicitly stated. +be explicitly stated. Instead of a floating point, an acceptable +value can be in the form of a cons cell like (height . FLOAT) +or (height FLOAT), where FLOAT is the given number. + +The `all-buttons' property extends the box button effect (or the +aforementioned properties) to the faces of the generic widget +library. By default, those do not look like the buttons of the +Custom UI as they are ordinary text wrapped in square brackets. Combinations of any of those properties are expressed as a list, like in these examples: (flat) (variable-pitch flat) - (variable-pitch flat 0.9 semibold) + (variable-pitch flat semibold 0.9) + (variable-pitch flat semibold (height 0.9)) ; same as above + (variable-pitch flat semibold (height . 0.9)) ; same as above The order in which the properties are set is not significant. @@ -3116,7 +3093,7 @@ In user configuration files the form may look like this: (setq modus-themes-box-buttons (quote (variable-pitch flat 0.9)))" :group 'modus-themes - :package-version '(modus-themes . "2.1.0") + :package-version '(modus-themes . "2.3.0") :version "29.1" :type '(set :tag "Properties" :greedy t (const :tag "Two-dimensional button" flat) @@ -3124,6 +3101,7 @@ In user configuration files the form may look like this: (const :tag "Reduce overall coloration" faint) (const :tag "Proportionately spaced font (variable-pitch)" variable-pitch) (const :tag "Underline instead of a box effect" underline) + (const :tag "Apply box button style to generic widget faces" all-buttons) (choice :tag "Font weight (must be supported by the typeface)" (const :tag "Thin" thin) (const :tag "Ultra-light" ultralight) @@ -3136,7 +3114,11 @@ In user configuration files the form may look like this: (const :tag "Semi-bold" semibold) (const :tag "Extra-bold" extrabold) (const :tag "Ultra-bold" ultrabold)) - (float :tag "Number (float) to adjust height by" :value 0.9)) + (radio :tag "Height" + (float :tag "Floating point to adjust height by") + (cons :tag "Cons cell of `(height . FLOAT)'" + (const :tag "The `height' key (constant)" height) + (float :tag "Floating point")))) :set #'modus-themes--set-option :initialize #'custom-initialize-default :link '(info-link "(modus-themes) Box buttons")) @@ -3145,6 +3127,32 @@ In user configuration files the form may look like this: ;;; Internal functions +(defun modus-themes--warn (option) + "Warn that OPTION has changed." + (prog1 nil + (display-warning + 'modus-themes + (format "`%s' has changed; please read the updated documentation" option) + :warning))) + +(defun modus-themes--list-or-warn (option) + "Return list or nil value of OPTION, else `modus-themes--warn'." + (let* ((value (symbol-value option))) + (if (or (null value) (listp value)) + value + (modus-themes--warn option)))) + +(defun modus-themes--alist-or-seq (properties alist-key seq-pred seq-default) + "Return value from alist or sequence. +Check PROPERTIES for an alist value that corresponds to +ALIST-KEY. If no alist is present, search the PROPERTIES +sequence given SEQ-PRED, using SEQ-DEFAULT as a fallback." + (if-let* ((val (or (alist-get alist-key properties) + (seq-find seq-pred properties seq-default))) + ((listp val))) + (car val) + val)) + (defun modus-themes--palette (theme) "Return color palette for Modus theme THEME. THEME is a symbol, either `modus-operandi' or `modus-vivendi'." @@ -3183,8 +3191,9 @@ Those are stored in `modus-themes-faces' and (custom-theme-set-variables ',name ,@modus-themes-custom-variables)))) (defun modus-themes--current-theme () - "Return current theme." - (car custom-enabled-themes)) + "Return current modus theme." + (car (seq-filter (lambda (arg) (string-match-p "^modus" (symbol-name arg))) + custom-enabled-themes))) ;; Helper functions that are meant to ease the implementation of the ;; above customization variables. @@ -3269,45 +3278,36 @@ pattern and represent a value that is faint or vibrant respectively. INTENSEFG-ALT is used when the intensity is high. SUBTLEBG and INTENSEBG are color-coded background colors that differ in overall intensity. FAINTFG is a nuanced color." - (let ((modus-themes-lang-checkers - (if (listp modus-themes-lang-checkers) - modus-themes-lang-checkers - (pcase modus-themes-lang-checkers - ('colored-background '(background intense)) - ('intense-foreground '(intense)) - ('intense-foreground-straight-underline '(intense straight-underline)) - ('subtle-foreground '(text-also)) - ('subtle-foreground-straight-underline '(text-also straight-underline)) - ('straight-underline '(straight-underline)))))) + (let ((properties (modus-themes--list-or-warn 'modus-themes-lang-checkers))) (list :underline (list :color - (if (memq 'faint modus-themes-lang-checkers) + (if (memq 'faint properties) faintfg underline) :style - (if (memq 'straight-underline modus-themes-lang-checkers) + (if (memq 'straight-underline properties) 'line 'wave)) :background (cond - ((and (memq 'background modus-themes-lang-checkers) - (memq 'faint modus-themes-lang-checkers)) + ((and (memq 'background properties) + (memq 'faint properties)) subtlebg) - ((and (memq 'background modus-themes-lang-checkers) - (memq 'intense modus-themes-lang-checkers)) + ((and (memq 'background properties) + (memq 'intense properties)) intensebg) - ((memq 'background modus-themes-lang-checkers) + ((memq 'background properties) subtlebg) ('unspecified)) :foreground (cond - ((and (memq 'faint modus-themes-lang-checkers) - (memq 'text-also modus-themes-lang-checkers)) + ((and (memq 'faint properties) + (memq 'text-also properties)) faintfg) - ((and (memq 'background modus-themes-lang-checkers) - (memq 'intense modus-themes-lang-checkers)) + ((and (memq 'background properties) + (memq 'intense properties)) intensefg-alt) - ((memq 'intense modus-themes-lang-checkers) + ((memq 'intense properties) intensefg) - ((memq 'text-also modus-themes-lang-checkers) + ((memq 'text-also properties) subtlefg) ('unspecified))))) @@ -3326,7 +3326,7 @@ should be combinable with INTENSEBG-FG. SUBTLEBGGRAY and INTENSEBGGRAY are background values. The former can be combined with GRAYFG, while the latter only works with the theme's fallback text color." - (let ((properties modus-themes-prompts)) + (let ((properties (modus-themes--list-or-warn 'modus-themes-prompts))) (list :foreground (cond ((and (memq 'gray properties) @@ -3372,7 +3372,7 @@ NORMALBG should be the special palette color 'bg-paren-match' or something similar. INTENSEBG must be easier to discern next to other backgrounds, such as the special palette color 'bg-paren-match-intense'." - (let ((properties modus-themes-paren-match)) + (let ((properties (modus-themes--list-or-warn 'modus-themes-paren-match))) (list :inherit (if (memq 'bold properties) 'bold @@ -3390,7 +3390,7 @@ other backgrounds, such as the special palette color "Apply foreground value to code syntax. FG is the default. FAINT is typically the same color in its desaturated version." - (let ((properties modus-themes-syntax)) + (let ((properties (modus-themes--list-or-warn 'modus-themes-syntax))) (list :foreground (cond ((memq 'faint properties) @@ -3402,7 +3402,7 @@ desaturated version." FG is the default. FAINT is typically the same color in its desaturated version. ALT is another hue while optional FAINT-ALT is its subtle alternative." - (let ((properties modus-themes-syntax)) + (let ((properties (modus-themes--list-or-warn 'modus-themes-syntax))) (list :foreground (cond ((and (memq 'alt-syntax properties) @@ -3421,7 +3421,7 @@ desaturated version. GREEN is a color variant in that side of the spectrum. ALT is another hue. Optional FAINT-GREEN is a subtle alternative to GREEN. Optional FAINT-ALT is a subtle alternative to ALT." - (let ((properties modus-themes-syntax)) + (let ((properties (modus-themes--list-or-warn 'modus-themes-syntax))) (list :foreground (cond ((and (memq 'faint properties) @@ -3443,7 +3443,7 @@ alternative to ALT." FG is the default. YELLOW is a color variant of that name while optional FAINT-YELLOW is its subtle variant. Optional FAINT is an alternative to the default value." - (let ((properties modus-themes-syntax)) + (let ((properties (modus-themes--list-or-warn 'modus-themes-syntax))) (list :foreground (cond ((and (memq 'faint properties) @@ -3521,7 +3521,7 @@ that combines well with the background and foreground." fg-alt) (fg)) :height - (seq-find #'floatp properties 'unspecified) + (modus-themes--alist-or-seq properties 'height #'floatp 'unspecified) :weight (or weight 'unspecified) :overline @@ -3546,7 +3546,7 @@ FG is the foreground color to use." (or weight 'unspecified) :height (cond ((memq 'no-scale properties) 'unspecified) - ((seq-find #'floatp properties 1.15))) + ((modus-themes--alist-or-seq properties 'height #'floatp 1.15))) :foreground fg))) (defun modus-themes--agenda-date (defaultfg grayscalefg &optional workaholicfg grayscaleworkaholicfg bg bold ul) @@ -3581,7 +3581,7 @@ weight. Optional UL applies an underline." (t defaultfg)) :height - (seq-find #'floatp properties 'unspecified) + (modus-themes--alist-or-seq properties 'height #'floatp 'unspecified) :underline (if (and ul (memq 'underline-today properties)) t @@ -3711,8 +3711,9 @@ line's box property. Optional FG-DISTANT should be close to the main background values. It is intended to be used as a distant-foreground property." - (let* ((properties modus-themes-mode-line) - (padding (seq-find #'natnump properties 1)) + (let* ((properties (modus-themes--list-or-warn 'modus-themes-mode-line)) + (padding (modus-themes--alist-or-seq properties 'padding #'natnump 1)) + (height (modus-themes--alist-or-seq properties 'height #'floatp 'unspecified)) (padded (> padding 1)) (base (cond ((memq 'accented properties) (cons fg-accent bg-accent)) @@ -3735,6 +3736,7 @@ property." (border)))) (list :foreground (car base) :background (cdr base) + :height height :box (cond ((memq 'moody properties) 'unspecified) @@ -3807,26 +3809,21 @@ unspecified." (list deuteran) (list main))) -(defun modus-themes--completion (key bg fg bgintense fgintense &optional bgaccent bgaccentintense) +(make-obsolete 'modus-themes--completion 'modus-themes--completion-line "2.3.0") +(make-obsolete 'modus-themes--completion 'modus-themes--completion-match "2.3.0") + +(defun modus-themes--completion-line (key bg fg bgintense fgintense &optional bgaccent bgaccentintense) "Styles for `modus-themes-completions'. KEY is the key of a cons cell. BG and FG are the main colors. BGINTENSE works with the main foreground. FGINTENSE works on its own. BGACCENT and BGACCENTINTENSE are colorful variants of the other backgrounds." - (let* ((var (if (listp modus-themes-completions) - modus-themes-completions - (prog1 nil - (warn (concat "`modus-themes-completions' has changed." - "\n" - "Its value must now be an alist." - "\n" - "Please read the updated doc string."))))) + (let* ((var (modus-themes--list-or-warn 'modus-themes-completions)) (properties (or (alist-get key var) (alist-get t var))) (popup (eq key 'popup)) (selection (eq key 'selection)) (line (or popup selection)) - (background (or line (memq 'background properties))) - (base-fg (if selection fg 'unspecified)) + (text (memq 'text-also properties)) (accented (memq 'accented properties)) (intense (memq 'intense properties)) (italic (memq 'italic properties)) @@ -3847,6 +3844,43 @@ other backgrounds." bgaccentintense) ((and accented line) bgaccent) + (intense bgintense) + (bg)) + :foreground + (cond + ((and line text intense) + fgintense) + ((and line text) + fg) + ('unspecified)) + :underline + (if (memq 'underline properties) t 'unspecified) + :weight + (if (and weight (null bold)) weight 'unspecified)))) + +(defun modus-themes--completion-match (key bg fg bgintense fgintense) + "Styles for `modus-themes-completions'. +KEY is the key of a cons cell. BG and FG are the main colors. +BGINTENSE works with the main foreground. FGINTENSE works on its +own." + (let* ((var (modus-themes--list-or-warn 'modus-themes-completions)) + (properties (or (alist-get key var) (alist-get t var))) + (background (memq 'background properties)) + (intense (memq 'intense properties)) + (italic (memq 'italic properties)) + (weight (modus-themes--weight properties)) + (bold (when (and weight (eq weight 'bold)) 'bold))) + (list + :inherit + (cond + ((and italic weight (not (eq weight 'bold))) + 'italic) + ((and weight (not (eq weight 'bold))) + 'unspecified) + (italic 'bold-italic) + ('bold)) + :background + (cond ((and background intense) bgintense) (background bg) @@ -3854,7 +3888,7 @@ other backgrounds." :foreground (cond ((and background intense) - base-fg) + 'unspecified) (background fg) (intense fgintense) (fg)) @@ -3869,7 +3903,7 @@ FG is the link's default color for its text and underline property. FGFAINT is a desaturated color for the text and underline. UNDERLINE is a gray color only for the undeline. BG is a background color and BGNEUTRAL is its fallback value." - (let ((properties modus-themes-links)) + (let ((properties (modus-themes--list-or-warn 'modus-themes-links))) (list :inherit (cond ((and (memq 'bold properties) @@ -3907,7 +3941,7 @@ is a background color and BGNEUTRAL is its fallback value." "Extend `modus-themes--link'. FG is the main accented foreground. FGFAINT is also accented, yet desaturated. Optional NEUTRALFG is a gray value." - (let ((properties modus-themes-links)) + (let ((properties (modus-themes--list-or-warn 'modus-themes-links))) (list :foreground (cond ((memq 'no-color properties) @@ -3931,7 +3965,7 @@ is a subtle background value that can be combined with all colors used to fontify text and code syntax. BGACCENT is a colored background that combines well with FG. BGACCENTSUBTLE can be combined with all colors used to fontify text." - (let ((properties modus-themes-region)) + (let ((properties (modus-themes--list-or-warn 'modus-themes-region))) (list :background (cond ((and (memq 'accented properties) @@ -3967,7 +4001,7 @@ LINEACCENT are color values that can remain distinct against the buffer's possible backgrounds: the former is neutral, the latter is accented. LINENEUTRALINTENSE and LINEACCENTINTENSE are their more prominent alternatives." - (let ((properties modus-themes-hl-line)) + (let ((properties (modus-themes--list-or-warn 'modus-themes-hl-line))) (list :background (cond ((and (memq 'intense properties) @@ -4034,7 +4068,12 @@ application of a variable-pitch font." (defun modus-themes--button (bg bgfaint bgaccent bgaccentfaint border &optional pressed-button-p) "Apply `modus-themes-box-buttons' styles. -Work in progress. BG BGFAINT BGACCENT BGACCENTFAINT BORDER PRESSED-BUTTON-P." +BG is the main background. BGFAINT is its subtle alternative. +BGACCENT is its accented variant and BGACCENTFAINT is the same +but less intense. BORDER is the color around the box. + +When optional PRESSED-BUTTON-P is non-nil, the box uses the +pressed button style, else the released button." (let* ((properties modus-themes-box-buttons) (weight (modus-themes--weight properties))) (list :inherit @@ -4075,7 +4114,7 @@ Work in progress. BG BGFAINT BGACCENT BGACCENTFAINT BORDER PRESSED-BUTTON-P." (weight weight) ('unspecified)) :height - (seq-find #'floatp properties 'unspecified) + (modus-themes--alist-or-seq properties 'height #'floatp 'unspecified) :underline (if (memq 'underline properties) t @@ -4228,30 +4267,6 @@ as when they are declared in the `:config' phase)." (defvar modus-themes-after-load-theme-hook nil "Hook that runs after the `modus-themes-toggle' routines.") -;; The reason we use `load-theme' instead of `enable-theme' is that the -;; former does a kind of "reset" on the face specs. So it plays nicely -;; with `custom-set-faces', as well as defcustom user customizations, -;; including the likes of `modus-themes-operandi-color-overrides'. -;; -;; Tests show that `enable-theme' does not re-read those variables, so -;; it might appear to the unsuspecting user that the themes are somehow -;; broken. -;; -;; This "reset", however, comes at the cost of being a bit slower than -;; `enable-theme'. User who have a stable setup and seldom update their -;; variables during a given Emacs session, are better off using -;; something like this: -;; -;; (defun modus-themes-toggle-enabled () -;; "Toggle between `modus-operandi' and `modus-vivendi' themes." -;; (interactive) -;; (pcase (modus-themes--current-theme) -;; ('modus-operandi (progn (enable-theme 'modus-vivendi) -;; (disable-theme 'modus-operandi))) -;; ('modus-vivendi (progn (enable-theme 'modus-operandi) -;; (disable-theme 'modus-vivendi))) -;; (_ (error "No Modus theme is loaded; evaluate `modus-themes-load-themes' first")))) - ;;;###autoload (defun modus-themes-load-operandi () "Load `modus-operandi' and disable `modus-vivendi'. @@ -4505,30 +4520,30 @@ by virtue of calling either of `modus-themes-load-operandi' and `(modus-themes-tab-inactive ((,class ,@(modus-themes--tab bg-tab-inactive bg-tab-inactive-accent fg-dim nil t)))) ;;;;; completion frameworks `(modus-themes-completion-match-0 - ((,class ,@(modus-themes--completion + ((,class ,@(modus-themes--completion-match 'matches bg-special-faint-calm magenta-alt magenta-subtle-bg magenta-intense)))) `(modus-themes-completion-match-1 - ((,class ,@(modus-themes--completion + ((,class ,@(modus-themes--completion-match 'matches bg-special-faint-cold cyan cyan-subtle-bg cyan-intense)))) `(modus-themes-completion-match-2 - ((,class ,@(modus-themes--completion + ((,class ,@(modus-themes--completion-match 'matches bg-special-faint-mild green green-subtle-bg green-intense)))) `(modus-themes-completion-match-3 - ((,class ,@(modus-themes--completion + ((,class ,@(modus-themes--completion-match 'matches bg-special-faint-warm yellow yellow-subtle-bg orange-intense)))) `(modus-themes-completion-selected - ((,class ,@(modus-themes--completion - 'selection bg-inactive 'unspecified - bg-active 'unspecified + ((,class ,@(modus-themes--completion-line + 'selection bg-inactive blue-alt + bg-active blue-active bg-completion-subtle bg-completion)))) `(modus-themes-completion-selected-popup - ((,class ,@(modus-themes--completion - 'popup bg-active 'unspecified - bg-region 'unspecified + ((,class ,@(modus-themes--completion-line + 'popup bg-active blue-alt + bg-region blue-active cyan-subtle-bg cyan-refine-bg)))) ;;;;; buttons `(modus-themes-box-button @@ -4568,6 +4583,7 @@ by virtue of calling either of `modus-themes-load-operandi' and ;;;;; basic and/or ungrouped styles `(bold ((,class :weight bold))) `(bold-italic ((,class :inherit (bold italic)))) + `(underline ((,class :underline ,fg-alt))) `(buffer-menu-buffer ((,class :inherit bold))) `(child-frame-border ((,class :background ,fg-window-divider-inner))) `(comint-highlight-input ((,class :inherit bold))) @@ -4598,6 +4614,7 @@ by virtue of calling either of `modus-themes-load-operandi' and bg-hl-alt-intense bg-region-accent bg-region-accent-subtle)))) `(secondary-selection ((,class :inherit modus-themes-special-cold))) + `(separator-line ((,class :underline ,bg-region))) `(shadow ((,class :foreground ,fg-alt))) `(success ((,class :inherit (bold modus-themes-grue)))) `(trailing-whitespace ((,class :background ,red-intense-bg))) @@ -4611,8 +4628,12 @@ by virtue of calling either of `modus-themes-load-operandi' and ,@(modus-themes--link-color magenta-alt-other magenta-alt-other-faint fg-alt)))) `(tooltip ((,class :background ,bg-special-cold :foreground ,fg-main))) - `(widget-button ((,class :inherit bold :foreground ,blue-alt))) - `(widget-button-pressed ((,class :inherit widget-button :foreground ,magenta))) + `(widget-button ((,class ,@(if (memq 'all-buttons modus-themes-box-buttons) + (list :inherit 'modus-themes-box-button) + (list :inherit 'bold :foreground blue-alt))))) + `(widget-button-pressed ((,class ,@(if (memq 'all-buttons modus-themes-box-buttons) + (list :inherit 'modus-themes-box-button-pressed) + (list :inherit 'bold :foreground magenta-alt))))) `(widget-documentation ((,class :foreground ,green))) `(widget-field ((,class :background ,bg-alt :foreground ,fg-main :extend nil))) `(widget-inactive ((,class :inherit shadow :background ,bg-dim))) @@ -4724,7 +4745,7 @@ by virtue of calling either of `modus-themes-load-operandi' and `(font-latex-string-face ((,class :inherit font-lock-string-face))) `(font-latex-subscript-face ((,class :height 0.95))) `(font-latex-superscript-face ((,class :height 0.95))) - `(font-latex-verbatim-face ((,class :background ,bg-dim :foreground ,fg-special-mild))) + `(font-latex-verbatim-face ((,class :inherit modus-themes-markup-verbatim))) `(font-latex-warning-face ((,class :inherit font-lock-warning-face))) `(tex-match ((,class :foreground ,blue-alt-other))) `(tex-verbatim ((,class :inherit modus-themes-markup-verbatim))) @@ -4737,11 +4758,11 @@ by virtue of calling either of `modus-themes-load-operandi' and `(auto-dim-other-buffers-face ((,class :background ,bg-alt))) ;;;;; avy `(avy-background-face ((,class :background ,bg-dim :foreground ,fg-dim :extend t))) - `(avy-goto-char-timer-face ((,class :inherit (modus-themes-intense-yellow bold)))) - `(avy-lead-face ((,class :inherit (modus-themes-intense-magenta bold modus-themes-reset-soft)))) - `(avy-lead-face-0 ((,class :inherit (modus-themes-refine-cyan bold modus-themes-reset-soft)))) - `(avy-lead-face-1 ((,class :inherit (modus-themes-intense-neutral bold modus-themes-reset-soft)))) - `(avy-lead-face-2 ((,class :inherit (modus-themes-refine-red bold modus-themes-reset-soft)))) + `(avy-goto-char-timer-face ((,class :inherit (modus-themes-intense-neutral bold)))) + `(avy-lead-face ((,class :inherit (modus-themes-intense-blue bold modus-themes-reset-soft)))) + `(avy-lead-face-0 ((,class :inherit (modus-themes-refine-magenta bold modus-themes-reset-soft)))) + `(avy-lead-face-1 ((,class :inherit (modus-themes-special-warm modus-themes-reset-soft)))) + `(avy-lead-face-2 ((,class :inherit (modus-themes-refine-green bold modus-themes-reset-soft)))) ;;;;; aw (ace-window) `(aw-background-face ((,class :foreground ,fg-unfocused))) `(aw-key-face ((,class :inherit modus-themes-key-binding))) @@ -4835,7 +4856,7 @@ by virtue of calling either of `modus-themes-load-operandi' and `(centaur-tabs-close-unselected ((,class :inherit centaur-tabs-unselected))) `(centaur-tabs-modified-marker-selected ((,class :inherit centaur-tabs-selected))) `(centaur-tabs-modified-marker-unselected ((,class :inherit centaur-tabs-unselected))) - `(centaur-tabs-default (( ))) + `(centaur-tabs-default ((,class :background ,bg-main))) `(centaur-tabs-selected ((,class :inherit modus-themes-tab-active))) `(centaur-tabs-selected-modified ((,class :inherit (italic centaur-tabs-selected)))) `(centaur-tabs-unselected ((,class :inherit modus-themes-tab-inactive))) @@ -4926,7 +4947,7 @@ by virtue of calling either of `modus-themes-load-operandi' and `(company-preview-common ((,class :inherit company-echo-common))) `(company-preview-search ((,class :inherit modus-themes-special-calm))) `(company-template-field ((,class :inherit modus-themes-intense-magenta))) - `(company-tooltip ((,class :background ,bg-alt :foreground ,fg-alt))) + `(company-tooltip ((,class :background ,bg-alt))) `(company-tooltip-annotation ((,class :inherit completions-annotations))) `(company-tooltip-common ((,class :inherit company-echo-common))) `(company-tooltip-deprecated ((,class :inherit company-tooltip :strike-through t))) @@ -5079,6 +5100,8 @@ by virtue of calling either of `modus-themes-load-operandi' and `(deft-summary-face ((,class :inherit (shadow modus-themes-slant)))) `(deft-time-face ((,class :foreground ,fg-special-cold))) `(deft-title-face ((,class :inherit bold :foreground ,fg-main))) +;;;;; devdocs + `(devdocs-code-block ((,class :inherit modus-themes-fixed-pitch :background ,bg-dim :extend t))) ;;;;; dictionary `(dictionary-button-face ((,class :inherit bold :foreground ,fg-special-cold))) `(dictionary-reference-face ((,class :inherit button))) @@ -5224,7 +5247,7 @@ by virtue of calling either of `modus-themes-load-operandi' and `(diredp-tagged-autofile-name ((,class :inherit modus-themes-refine-magenta))) `(diredp-write-priv ((,class :foreground ,cyan))) ;;;;; display-fill-column-indicator-mode - `(fill-column-indicator ((,class :foreground ,bg-active))) + `(fill-column-indicator ((,class :height 1 :background ,bg-inactive :foreground ,bg-inactive))) ;;;;; doom-modeline `(doom-modeline-bar ((,class :inherit modus-themes-active-blue))) `(doom-modeline-bar-inactive ((,class :background ,fg-inactive :foreground ,bg-main))) @@ -5341,10 +5364,11 @@ by virtue of calling either of `modus-themes-load-operandi' and `(elpher-gemini-heading3 ((,class :inherit modus-themes-heading-3))) ;;;;; embark `(embark-keybinding ((,class :inherit modus-themes-key-binding))) + `(embark-collect-marked ((,class :inherit modus-themes-mark-sel))) ;;;;; ement (ement.el) `(ement-room-fully-read-marker ((,class :background ,cyan-subtle-bg))) `(ement-room-membership ((,class :inherit shadow))) - `(ement-room-mention (( ))) + `(ement-room-mention ((,class :background ,bg-hl-alt-intense))) `(ement-room-name ((,class :inherit bold))) `(ement-room-reactions ((,class :inherit shadow))) `(ement-room-read-receipt-marker ((,class :background ,yellow-subtle-bg))) @@ -5910,7 +5934,9 @@ by virtue of calling either of `modus-themes-load-operandi' and `(hi-red-b ((,class :inherit bold :background ,red-intense-bg :foreground ,fg-main))) `(hi-salmon ((,class :background ,red-subtle-bg :foreground ,fg-main))) `(hi-yellow ((,class :background ,yellow-subtle-bg :foreground ,fg-main))) - `(highlight ((,class :background ,cyan-subtle-bg :foreground ,fg-main))) + `(highlight ((,class ,@(if modus-themes-intense-mouseovers + (list :background blue-intense-bg :foreground fg-main) + (list :background cyan-subtle-bg :foreground fg-main))))) `(highlight-changes ((,class :foreground ,red-alt :underline nil))) `(highlight-changes-delete ((,class :background ,red-nuanced-bg :foreground ,red :underline t))) @@ -5942,7 +5968,7 @@ by virtue of calling either of `modus-themes-load-operandi' and ;;;;; icomplete-vertical `(icomplete-vertical-separator ((,class :inherit shadow))) ;;;;; ido-mode - `(ido-first-match ((,class :inherit modus-themes-completion-selected))) + `(ido-first-match ((,class :inherit modus-themes-completion-match-0))) `(ido-incomplete-regexp ((,class :inherit error))) `(ido-indicator ((,class :inherit modus-themes-subtle-yellow))) `(ido-only-match ((,class :inherit ido-first-match))) @@ -6436,6 +6462,9 @@ by virtue of calling either of `modus-themes-load-operandi' and `(message-header-xheader ((,class :foreground ,blue-alt))) `(message-mml ((,class :foreground ,cyan-alt-other))) `(message-separator ((,class :inherit modus-themes-intense-neutral))) +;;;;; mini-modeline + `(mini-modeline-mode-line ((,class :background ,blue-intense :height 0.14))) + `(mini-modeline-mode-line-inactive ((,class :background ,fg-window-divider-inner :height 0.1))) ;;;;; minimap `(minimap-active-region-background ((,class :background ,bg-active))) `(minimap-current-line-face ((,class :background ,cyan-intense-bg :foreground ,fg-main))) @@ -6459,7 +6488,9 @@ by virtue of calling either of `modus-themes-load-operandi' and `(mode-line-active ((,class :inherit mode-line))) `(mode-line-buffer-id ((,class :inherit bold))) `(mode-line-emphasis ((,class :inherit bold :foreground ,magenta-active))) - `(mode-line-highlight ((,class :inherit highlight))) + `(mode-line-highlight ((,class ,@(if modus-themes-intense-mouseovers + (list :inherit 'modus-themes-active-blue) + (list :inherit 'highlight))))) `(mode-line-inactive ((,class :inherit modus-themes-ui-variable-pitch ,@(modus-themes--mode-line-attrs fg-inactive bg-inactive @@ -6616,7 +6647,7 @@ by virtue of calling either of `modus-themes-load-operandi' and ;;;;; org `(org-agenda-calendar-event ((,class ,@(modus-themes--agenda-event blue-alt)))) `(org-agenda-calendar-sexp ((,class ,@(modus-themes--agenda-event blue-alt t)))) - `(org-agenda-clocking ((,class :inherit modus-themes-special-cold :extend t))) + `(org-agenda-clocking ((,class :background ,yellow-nuanced-bg :foreground ,red-alt))) `(org-agenda-column-dateline ((,class :background ,bg-alt))) `(org-agenda-current-time ((,class :foreground ,blue-alt-other-faint))) `(org-agenda-date ((,class ,@(modus-themes--agenda-date cyan fg-main)))) @@ -6650,7 +6681,7 @@ by virtue of calling either of `modus-themes-load-operandi' and `(org-checkbox (( ))) `(org-checkbox-statistics-done ((,class :inherit org-done))) `(org-checkbox-statistics-todo ((,class :inherit org-todo))) - `(org-clock-overlay ((,class :inherit modus-themes-special-cold))) + `(org-clock-overlay ((,class :background ,yellow-nuanced-bg :foreground ,red-alt-faint))) `(org-code ((,class :inherit modus-themes-markup-code :extend t))) `(org-column ((,class :inherit (modus-themes-fixed-pitch default) :background ,bg-alt))) @@ -6721,7 +6752,7 @@ by virtue of calling either of `modus-themes-load-operandi' and `(org-hide ((,class :foreground ,bg-main))) `(org-indent ((,class :inherit (fixed-pitch org-hide)))) `(org-imminent-deadline ((,class :foreground ,red-intense))) - `(org-latex-and-related ((,class :foreground ,magenta-refine-fg))) + `(org-latex-and-related ((,class :foreground ,magenta-faint))) `(org-level-1 ((,class :inherit modus-themes-heading-1))) `(org-level-2 ((,class :inherit modus-themes-heading-2))) `(org-level-3 ((,class :inherit modus-themes-heading-3))) @@ -7044,13 +7075,14 @@ by virtue of calling either of `modus-themes-load-operandi' and `(show-paren-match-expression ((,class :background ,bg-paren-expression))) `(show-paren-mismatch ((,class :inherit modus-themes-intense-red))) ;;;;; shr + `(shr-abbreviation ((,class :inherit modus-themes-lang-note))) + `(shr-code ((,class :inherit modus-themes-markup-verbatim))) `(shr-h1 ((,class :inherit modus-themes-heading-1))) `(shr-h2 ((,class :inherit modus-themes-heading-2))) `(shr-h3 ((,class :inherit modus-themes-heading-3))) `(shr-h4 ((,class :inherit modus-themes-heading-4))) `(shr-h5 ((,class :inherit modus-themes-heading-5))) `(shr-h6 ((,class :inherit modus-themes-heading-6))) - `(shr-abbreviation ((,class :inherit modus-themes-lang-note))) `(shr-selected-link ((,class :inherit modus-themes-subtle-red))) ;;;;; side-notes `(side-notes ((,class :background ,bg-dim :foreground ,fg-dim))) @@ -7428,8 +7460,8 @@ by virtue of calling either of `modus-themes-load-operandi' and ;;;;; vertico `(vertico-current ((,class :inherit modus-themes-completion-selected))) ;;;;; vertico-quick - `(vertico-quick1 ((,class :inherit (modus-themes-intense-magenta bold)))) - `(vertico-quick2 ((,class :inherit (modus-themes-refine-cyan bold)))) + `(vertico-quick1 ((,class :inherit (modus-themes-intense-blue bold)))) + `(vertico-quick2 ((,class :inherit (modus-themes-refine-magenta bold)))) ;;;;; vimish-fold `(vimish-fold-fringe ((,class :foreground ,cyan-active))) `(vimish-fold-mouse-face ((,class :inherit modus-themes-intense-blue))) @@ -7645,6 +7677,8 @@ by virtue of calling either of `modus-themes-load-operandi' and ("XXX+" . ,red-alt) ("REVIEW" . ,cyan-alt-other) ("DEPRECATED" . ,blue-nuanced-fg))) +;;;; mini-modeline + `(mini-modeline-face-attr '(:background unspecified)) ;;;; pdf-tools `(pdf-view-midnight-colors '(,fg-main . ,bg-dim)) @@ -7671,6 +7705,20 @@ by virtue of calling either of `modus-themes-load-operandi' and (340 . ,blue-alt-other) (360 . ,magenta-alt-other))) `(vc-annotate-very-old-color nil) +;;;; wid-edit + `(widget-link-prefix ,(if (memq 'all-buttons modus-themes-box-buttons) + " " + "[")) + `(widget-link-suffix ,(if (memq 'all-buttons modus-themes-box-buttons) + " " + "]")) + `(widget-mouse-face '(highlight widget-button)) + `(widget-push-button-prefix ,(if (memq 'all-buttons modus-themes-box-buttons) + " " + "[")) + `(widget-push-button-suffix ,(if (memq 'all-buttons modus-themes-box-buttons) + " " + "]")) ;;;; xterm-color `(xterm-color-names ["black" ,red ,green ,yellow ,blue ,magenta ,cyan "gray65"]) `(xterm-color-names-bright ["gray35" ,red-alt ,green-alt ,yellow-alt ,blue-alt ,magenta-alt ,cyan-alt "white"]) diff --git a/etc/themes/modus-vivendi-theme.el b/etc/themes/modus-vivendi-theme.el index 7d38e5cbf27..fb95772654f 100644 --- a/etc/themes/modus-vivendi-theme.el +++ b/etc/themes/modus-vivendi-theme.el @@ -1,10 +1,10 @@ -;;; modus-vivendi-theme.el --- Accessible and customizable dark theme (WCAG AAA) -*- lexical-binding:t -*- +;;; modus-vivendi-theme.el --- Elegant, highly legible and customizable light theme -*- lexical-binding:t -*- ;; Copyright (C) 2019-2022 Free Software Foundation, Inc. ;; Author: Protesilaos Stavrou ;; URL: https://gitlab.com/protesilaos/modus-themes -;; Version: 2.2.0 +;; Version: 2.3.0 ;; Package-Requires: ((emacs "27.1")) ;; Keywords: faces, theme, accessibility @@ -56,17 +56,17 @@ (equal (file-name-directory load-file-name) (expand-file-name "themes/" data-directory)) (require-theme 'modus-themes t)) - (require 'modus-themes))) + (require 'modus-themes)) -(deftheme modus-vivendi - "Accessible and customizable dark theme (WCAG AAA standard). + (deftheme modus-vivendi + "Elegant, highly legible and customizable dark theme. Conforms with the highest legibility standard for color contrast between background and foreground in any given piece of text, which corresponds to a minimum contrast in relative luminance of -7:1.") +7:1 (WCAG AAA standard).") -(modus-themes-theme modus-vivendi) + (modus-themes-theme modus-vivendi) -(provide-theme 'modus-vivendi) + (provide-theme 'modus-vivendi)) ;;; modus-vivendi-theme.el ends here