mirror of
https://github.com/protesilaos/ef-themes.git
synced 2026-09-10 07:06:15 -04:00
Make ef-themes--palette-value read common overrides
This commit is contained in:
parent
4d1f233082
commit
707f8afe0b
27
ef-themes.el
27
ef-themes.el
|
|
@ -297,6 +297,18 @@ Other examples:
|
|||
(const :tag "More intense background (also override text color)" accented))
|
||||
:link '(info-link "(ef-themes) Style of region highlight"))
|
||||
|
||||
;; TODO 2022-12-30: Make the palette overrides a `defcustom'
|
||||
(defvar ef-themes-common-palette-overrides nil
|
||||
"Set palette overrides for all the Ef themes.
|
||||
|
||||
Mirror the elements of a theme's palette, overriding their value.
|
||||
The palette variables are named THEME-NAME-palette, while
|
||||
individual theme overrides are THEME-NAME-palette-overrides. The
|
||||
THEME-NAME is one of the symbols in `ef-themes-collection'.
|
||||
|
||||
Individual theme overrides take precedence over these common
|
||||
overrides.")
|
||||
|
||||
;;; Helpers for user options
|
||||
|
||||
(defun ef-themes--warn (option)
|
||||
|
|
@ -430,7 +442,9 @@ symbol."
|
|||
"Return palette value of THEME with optional OVERRIDES."
|
||||
(let ((base-value (symbol-value (ef-themes--palette-symbol theme))))
|
||||
(if overrides
|
||||
(append (symbol-value (ef-themes--palette-symbol theme :overrides)) base-value)
|
||||
(append (symbol-value (ef-themes--palette-symbol theme :overrides))
|
||||
ef-themes-common-palette-overrides
|
||||
base-value)
|
||||
base-value)))
|
||||
|
||||
(defun ef-themes--current-theme-palette (&optional overrides)
|
||||
|
|
@ -1970,17 +1984,6 @@ Helper function for `ef-themes-preview-colors'."
|
|||
|
||||
;;;; Instantiate an Ef theme
|
||||
|
||||
(defvar ef-themes-common-palette-overrides nil
|
||||
"Set palette overrides for all the Ef themes.
|
||||
|
||||
Mirror the elements of a theme's palette, overriding their value.
|
||||
The palette variables are named THEME-NAME-palette, while
|
||||
individual theme overrides are THEME-NAME-palette-overrides. The
|
||||
THEME-NAME is one of the symbols in `ef-themes-collection'.
|
||||
|
||||
Individual theme overrides take precedence over these common
|
||||
overrides.")
|
||||
|
||||
;;;###autoload
|
||||
(defmacro ef-themes-theme (name palette &optional overrides)
|
||||
"Bind NAME's color PALETTE around face specs and variables.
|
||||
|
|
|
|||
Loading…
Reference in a new issue