mirror of
https://github.com/protesilaos/modus-themes.git
synced 2026-09-10 07:16:30 -04:00
Deprecate modus-themes-region; use overrides
This is the last user option that we need to deprecate for the release of version 4. Now all colour-related changes happen through palette overrides. Thanks to Christian Tietze for reminding me about it: <https://lists.sr.ht/~protesilaos/modus-themes/%3Cm1ilhtrs09.fsf%40christiantietze.de%3E>.
This commit is contained in:
parent
575644f9a3
commit
32dc7f9bc1
|
|
@ -307,8 +307,7 @@ This is how a basic setup could look like:
|
||||||
|
|
||||||
;; Add all your customizations prior to loading the themes.
|
;; Add all your customizations prior to loading the themes.
|
||||||
(setq modus-themes-italic-constructs t
|
(setq modus-themes-italic-constructs t
|
||||||
modus-themes-bold-constructs nil
|
modus-themes-bold-constructs nil)
|
||||||
modus-themes-region '(bg-only no-extend))
|
|
||||||
|
|
||||||
;; Load the theme of your choice.
|
;; Load the theme of your choice.
|
||||||
(load-theme 'modus-operandi)
|
(load-theme 'modus-operandi)
|
||||||
|
|
@ -325,8 +324,7 @@ This is how a basic setup could look like:
|
||||||
|
|
||||||
;; Add all your customizations prior to loading the themes
|
;; Add all your customizations prior to loading the themes
|
||||||
(setq modus-themes-italic-constructs t
|
(setq modus-themes-italic-constructs t
|
||||||
modus-themes-bold-constructs nil
|
modus-themes-bold-constructs nil)
|
||||||
modus-themes-region '(bg-only no-extend))
|
|
||||||
|
|
||||||
;; Load the theme of your choice.
|
;; Load the theme of your choice.
|
||||||
(load-theme 'modus-operandi :no-confim)
|
(load-theme 'modus-operandi :no-confim)
|
||||||
|
|
@ -355,8 +353,7 @@ package configurations in their setup. We use this as an example:
|
||||||
:init
|
:init
|
||||||
;; Add all your customizations prior to loading the themes
|
;; Add all your customizations prior to loading the themes
|
||||||
(setq modus-themes-italic-constructs t
|
(setq modus-themes-italic-constructs t
|
||||||
modus-themes-bold-constructs nil
|
modus-themes-bold-constructs nil)
|
||||||
modus-themes-region '(bg-only no-extend))
|
|
||||||
:config
|
:config
|
||||||
;; Load the theme of your choice.
|
;; Load the theme of your choice.
|
||||||
(load-theme 'modus-operandi)
|
(load-theme 'modus-operandi)
|
||||||
|
|
@ -370,8 +367,7 @@ package configurations in their setup. We use this as an example:
|
||||||
:init
|
:init
|
||||||
;; Add all your customizations prior to loading the themes
|
;; Add all your customizations prior to loading the themes
|
||||||
(setq modus-themes-italic-constructs t
|
(setq modus-themes-italic-constructs t
|
||||||
modus-themes-bold-constructs nil
|
modus-themes-bold-constructs nil)
|
||||||
modus-themes-region '(bg-only no-extend))
|
|
||||||
:config
|
:config
|
||||||
;; Load the theme of your choice.
|
;; Load the theme of your choice.
|
||||||
(load-theme 'modus-operandi :no-confim)
|
(load-theme 'modus-operandi :no-confim)
|
||||||
|
|
@ -384,8 +380,7 @@ The same without ~use-package~:
|
||||||
;;; For the built-in themes which cannot use `require':
|
;;; For the built-in themes which cannot use `require':
|
||||||
;; Add all your customizations prior to loading the themes
|
;; Add all your customizations prior to loading the themes
|
||||||
(setq modus-themes-italic-constructs t
|
(setq modus-themes-italic-constructs t
|
||||||
modus-themes-bold-constructs nil
|
modus-themes-bold-constructs nil)
|
||||||
modus-themes-region '(bg-only no-extend))
|
|
||||||
|
|
||||||
;; Load the theme of your choice:
|
;; Load the theme of your choice:
|
||||||
(load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi)
|
(load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi)
|
||||||
|
|
@ -399,8 +394,7 @@ The same without ~use-package~:
|
||||||
|
|
||||||
;; Add all your customizations prior to loading the themes
|
;; Add all your customizations prior to loading the themes
|
||||||
(setq modus-themes-italic-constructs t
|
(setq modus-themes-italic-constructs t
|
||||||
modus-themes-bold-constructs nil
|
modus-themes-bold-constructs nil)
|
||||||
modus-themes-region '(bg-only no-extend))
|
|
||||||
|
|
||||||
;; Load the theme of your choice:
|
;; Load the theme of your choice:
|
||||||
(load-theme 'modus-operandi :no-confim) ;; OR (load-theme 'modus-vivendi :no-confim)
|
(load-theme 'modus-operandi :no-confim) ;; OR (load-theme 'modus-vivendi :no-confim)
|
||||||
|
|
@ -506,11 +500,6 @@ reloaded for changes to take effect.
|
||||||
'((matches . (extrabold))
|
'((matches . (extrabold))
|
||||||
(selection . (semibold italic text-also)))
|
(selection . (semibold italic text-also)))
|
||||||
|
|
||||||
;; Options for `modus-themes-region' are either nil (the default),
|
|
||||||
;; or a list of properties that may include any of those symbols:
|
|
||||||
;; `no-extend', `bg-only'.
|
|
||||||
modus-themes-region '(bg-only no-extend)
|
|
||||||
|
|
||||||
modus-themes-org-blocks 'gray-background ; {nil,'gray-background,'tinted-background}
|
modus-themes-org-blocks 'gray-background ; {nil,'gray-background,'tinted-background}
|
||||||
|
|
||||||
;; The `modus-themes-headings' is an alist: read the manual's
|
;; The `modus-themes-headings' is an alist: read the manual's
|
||||||
|
|
@ -792,54 +781,6 @@ Is the same as:
|
||||||
|
|
||||||
[[#h:d959f789-0517-4636-8780-18123f936f91][Make completion matches more or less colorful]].
|
[[#h:d959f789-0517-4636-8780-18123f936f91][Make completion matches more or less colorful]].
|
||||||
|
|
||||||
** Option for active region
|
|
||||||
:properties:
|
|
||||||
:alt_title: Active region
|
|
||||||
:description: Choose between various styles for the active region
|
|
||||||
:custom_id: h:60798063-b4ad-45ea-b9a7-ff7b5c0ab74c
|
|
||||||
:end:
|
|
||||||
#+vindex: modus-themes-region
|
|
||||||
|
|
||||||
[ Simplified as part of {{{development-version}}}. It no longer
|
|
||||||
accepts an =accented= symbol. Changes to colors can be implemented
|
|
||||||
via the overrides. ]
|
|
||||||
|
|
||||||
Brief: Control the style of the region.
|
|
||||||
|
|
||||||
Symbol: ~modus-themes-region~ (=choice= type, list of properties)
|
|
||||||
|
|
||||||
Possible values are expressed as a list of properties (default is ~nil~ or
|
|
||||||
an empty list). The list can include any of the following symbols:
|
|
||||||
|
|
||||||
+ ~no-extend~
|
|
||||||
+ ~bg-only~
|
|
||||||
|
|
||||||
The default (a ~nil~ value or an empty list) is a prominent gray
|
|
||||||
background that overrides all foreground colors in the area it
|
|
||||||
encompasses. Its reach extends to the edge of the window.
|
|
||||||
|
|
||||||
The ~no-extend~ property limits the region to the end of the line, so that
|
|
||||||
it does not reach the edge of the window.
|
|
||||||
|
|
||||||
The ~bg-only~ property makes the region's background color more subtle to
|
|
||||||
allow the underlying text to retain its foreground colors.
|
|
||||||
|
|
||||||
Combinations of any of those properties are expressed as a list, like in
|
|
||||||
these examples:
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(no-extend)
|
|
||||||
(bg-only no-extend)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
The order in which the properties are set is not significant.
|
|
||||||
|
|
||||||
In user configuration files the form may look like this:
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(setq modus-themes-region '(bg-only no-extend))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Option for org-mode block styles
|
** Option for org-mode block styles
|
||||||
:properties:
|
:properties:
|
||||||
:alt_title: Org mode blocks
|
:alt_title: Org mode blocks
|
||||||
|
|
|
||||||
|
|
@ -158,8 +158,8 @@ standard).")
|
||||||
(bg-hover "#97dfed")
|
(bg-hover "#97dfed")
|
||||||
(bg-hover-secondary "#f5d0a0")
|
(bg-hover-secondary "#f5d0a0")
|
||||||
(bg-hl-line "#d0d6ec")
|
(bg-hl-line "#d0d6ec")
|
||||||
(bg-region "#bcbcbc")
|
(bg-region "#bdbdbd")
|
||||||
(bg-region-subtle "#f0e0cc")
|
(fg-region "#000000")
|
||||||
|
|
||||||
(bg-char-0 "#7feaff")
|
(bg-char-0 "#7feaff")
|
||||||
(bg-char-1 "#ffaaff")
|
(bg-char-1 "#ffaaff")
|
||||||
|
|
|
||||||
|
|
@ -156,8 +156,8 @@ which corresponds to a minimum contrast in relative luminance of
|
||||||
(bg-hover "#94d4ff")
|
(bg-hover "#94d4ff")
|
||||||
(bg-hover-secondary "#f5d0a0")
|
(bg-hover-secondary "#f5d0a0")
|
||||||
(bg-hl-line "#d0d6ec")
|
(bg-hl-line "#d0d6ec")
|
||||||
(bg-region "#bcbcbc")
|
(bg-region "#bdbdbd")
|
||||||
(bg-region-subtle "#f0e0cc")
|
(fg-region "#000000")
|
||||||
|
|
||||||
(bg-char-0 "#7feaff")
|
(bg-char-0 "#7feaff")
|
||||||
(bg-char-1 "#ffaaff")
|
(bg-char-1 "#ffaaff")
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ which corresponds to a minimum contrast in relative luminance of
|
||||||
(bg-hover-secondary "#f5d0a0")
|
(bg-hover-secondary "#f5d0a0")
|
||||||
(bg-hl-line "#f1d5d0")
|
(bg-hl-line "#f1d5d0")
|
||||||
(bg-region "#c2bcb5")
|
(bg-region "#c2bcb5")
|
||||||
(bg-region-subtle "#d9f2c0")
|
(fg-region "#000000")
|
||||||
|
|
||||||
(bg-char-0 "#7feaff")
|
(bg-char-0 "#7feaff")
|
||||||
(bg-char-1 "#ffaaff")
|
(bg-char-1 "#ffaaff")
|
||||||
|
|
|
||||||
|
|
@ -732,43 +732,7 @@ In user configuration files the form may look like this:
|
||||||
(make-obsolete-variable 'modus-themes-paren-match nil "4.0.0")
|
(make-obsolete-variable 'modus-themes-paren-match nil "4.0.0")
|
||||||
(make-obsolete-variable 'modus-themes-syntax nil "4.0.0")
|
(make-obsolete-variable 'modus-themes-syntax nil "4.0.0")
|
||||||
(make-obsolete-variable 'modus-themes-links nil "4.0.0")
|
(make-obsolete-variable 'modus-themes-links nil "4.0.0")
|
||||||
|
(make-obsolete-variable 'modus-themes-region nil "4.0.0")
|
||||||
(defcustom modus-themes-region nil
|
|
||||||
"Control the overall style of the active region.
|
|
||||||
|
|
||||||
The value is a list of properties, each designated by a symbol.
|
|
||||||
The default (a nil value or an empty list) is a prominent gray
|
|
||||||
background that overrides all foreground colors in the area it
|
|
||||||
encompasses. Its reach extends to the edge of the window.
|
|
||||||
|
|
||||||
The `no-extend' property limits the region to the end of the
|
|
||||||
line, so that it does not reach the edge of the window.
|
|
||||||
|
|
||||||
The `bg-only' property makes the region's background color more
|
|
||||||
subtle to allow the underlying text to retain its foreground
|
|
||||||
colors.
|
|
||||||
|
|
||||||
Combinations of properties are expressed as a list, like in these
|
|
||||||
examples:
|
|
||||||
|
|
||||||
(no-extend)
|
|
||||||
(bg-only no-extend)
|
|
||||||
|
|
||||||
The order in which the properties are set is not significant.
|
|
||||||
|
|
||||||
In user configuration files the form may look like this:
|
|
||||||
|
|
||||||
(setq modus-themes-region (quote (bg-only no-extend)))"
|
|
||||||
:group 'modus-themes
|
|
||||||
:package-version '(modus-themes . "4.0.0")
|
|
||||||
:version "30.1"
|
|
||||||
:type '(set :tag "Properties" :greedy t
|
|
||||||
(const :tag "Do not extend to the edge of the window" no-extend)
|
|
||||||
(const :tag "Background only (preserve underlying colors)" bg-only))
|
|
||||||
:set #'modus-themes--set-option
|
|
||||||
:initialize #'custom-initialize-default
|
|
||||||
:link '(info-link "(modus-themes) Active region"))
|
|
||||||
|
|
||||||
(make-obsolete-variable 'modus-themes-deuteranopia nil "4.0.0")
|
(make-obsolete-variable 'modus-themes-deuteranopia nil "4.0.0")
|
||||||
(make-obsolete-variable 'modus-themes-mail-citations nil "4.0.0")
|
(make-obsolete-variable 'modus-themes-mail-citations nil "4.0.0")
|
||||||
(make-obsolete-variable 'modus-themes-tabs-accented nil "4.0.0")
|
(make-obsolete-variable 'modus-themes-tabs-accented nil "4.0.0")
|
||||||
|
|
@ -1409,20 +1373,6 @@ FG and BG are the main colors."
|
||||||
:weight
|
:weight
|
||||||
(if (and weight (null bold)) weight 'unspecified))))
|
(if (and weight (null bold)) weight 'unspecified))))
|
||||||
|
|
||||||
(defun modus-themes--region (bg fg bgsubtle)
|
|
||||||
"Apply `modus-themes-region' styles.
|
|
||||||
|
|
||||||
BG and FG are the main values that are used by default. BGSUBTLE
|
|
||||||
is a less intense variant of BG."
|
|
||||||
(let* ((properties (modus-themes--list-or-warn 'modus-themes-region))
|
|
||||||
(bg-only (memq 'bg-only properties)))
|
|
||||||
(list :background
|
|
||||||
(if bg-only bgsubtle bg)
|
|
||||||
:foreground
|
|
||||||
(if bg-only 'unspecified fg)
|
|
||||||
:extend
|
|
||||||
(if (memq 'no-extend properties) nil t))))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;;; Face specifications
|
;;;; Face specifications
|
||||||
|
|
@ -1563,7 +1513,7 @@ is a less intense variant of BG."
|
||||||
`(pgtk-im-0 ((,c :inherit modus-themes-intense-cyan)))
|
`(pgtk-im-0 ((,c :inherit modus-themes-intense-cyan)))
|
||||||
`(read-multiple-choice-face ((,c :inherit (bold modus-themes-mark-alt))))
|
`(read-multiple-choice-face ((,c :inherit (bold modus-themes-mark-alt))))
|
||||||
`(rectangle-preview ((,c :inherit secondary-selection)))
|
`(rectangle-preview ((,c :inherit secondary-selection)))
|
||||||
`(region ((,c ,@(modus-themes--region bg-region fg-main bg-region-subtle))))
|
`(region ((,c :background ,bg-region :foreground ,fg-region)))
|
||||||
`(secondary-selection ((,c :background ,bg-hover-secondary)))
|
`(secondary-selection ((,c :background ,bg-hover-secondary)))
|
||||||
`(separator-line ((,c :underline ,bg-active)))
|
`(separator-line ((,c :underline ,bg-active)))
|
||||||
`(shadow ((,c :foreground ,fg-dim)))
|
`(shadow ((,c :foreground ,fg-dim)))
|
||||||
|
|
|
||||||
|
|
@ -157,8 +157,8 @@ standard).")
|
||||||
(bg-hover "#004f70")
|
(bg-hover "#004f70")
|
||||||
(bg-hover-secondary "#654a39")
|
(bg-hover-secondary "#654a39")
|
||||||
(bg-hl-line "#2f3849")
|
(bg-hl-line "#2f3849")
|
||||||
(bg-region "#5c5c5c")
|
(bg-region "#5a5a5a")
|
||||||
(bg-region-subtle "#4f1c2f")
|
(fg-region "#ffffff")
|
||||||
|
|
||||||
(bg-char-0 "#0050af")
|
(bg-char-0 "#0050af")
|
||||||
(bg-char-1 "#7f1f7f")
|
(bg-char-1 "#7f1f7f")
|
||||||
|
|
|
||||||
|
|
@ -155,8 +155,8 @@ which corresponds to a minimum contrast in relative luminance of
|
||||||
(bg-hover "#004f70")
|
(bg-hover "#004f70")
|
||||||
(bg-hover-secondary "#654a39")
|
(bg-hover-secondary "#654a39")
|
||||||
(bg-hl-line "#2f3849")
|
(bg-hl-line "#2f3849")
|
||||||
(bg-region "#5c5c5c")
|
(bg-region "#5a5a5a")
|
||||||
(bg-region-subtle "#4f1c2f")
|
(fg-region "#ffffff")
|
||||||
|
|
||||||
(bg-char-0 "#0050af")
|
(bg-char-0 "#0050af")
|
||||||
(bg-char-1 "#7f1f7f")
|
(bg-char-1 "#7f1f7f")
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ which corresponds to a minimum contrast in relative luminance of
|
||||||
(bg-hover-secondary "#654a39")
|
(bg-hover-secondary "#654a39")
|
||||||
(bg-hl-line "#303a6f")
|
(bg-hl-line "#303a6f")
|
||||||
(bg-region "#555a66")
|
(bg-region "#555a66")
|
||||||
(bg-region-subtle "#0f4f30")
|
(fg-region "#ffffff")
|
||||||
|
|
||||||
(bg-char-0 "#0050af")
|
(bg-char-0 "#0050af")
|
||||||
(bg-char-1 "#7f1f7f")
|
(bg-char-1 "#7f1f7f")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue