branch: externals/ef-themes commit 2044b169a6e8a18ffe208e769e1c7775ddb4dea7 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Implement ef-themes-underline-{error,info,warning} These faces make it easier to ensure consistency between different face groups. It is also easier for users to edit one face and have it apply to all appropriate contexts. --- ef-themes.el | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/ef-themes.el b/ef-themes.el index e1be30bb2e..daa553b3c5 100644 --- a/ef-themes.el +++ b/ef-themes.el @@ -562,6 +562,14 @@ Helper function for `ef-themes-preview-colors'." :package-version '(ef-themes . "0.9.0") :group 'ef-themes-faces)) +;; This produces `ef-themes-underline-error' and the like +(dolist (scope '(info error warning)) + (custom-declare-face + (intern (format "ef-themes-underline-%s" scope)) + nil (format "Face for %s underline (e.g. `flymake', `flyspell')." scope) + :package-version '(ef-themes . "0.9.0") + :group 'ef-themes-faces)) + (defconst ef-themes-faces '( ;;;; internal faces @@ -580,6 +588,9 @@ Helper function for `ef-themes-preview-colors'." `(ef-themes-mark-delete ((,c :inherit error :background ,bg-err))) `(ef-themes-mark-select ((,c :inherit success :background ,bg-info))) `(ef-themes-mark-other ((,c :inherit warning :background ,bg-warning))) + `(ef-themes-underline-error ((,c :underline (:style wave :color ,underline-err)))) + `(ef-themes-underline-info ((,c :underline (:style wave :color ,underline-info)))) + `(ef-themes-underline-warning ((,c :underline (:style wave :color ,underline-warning)))) ;;;; all basic faces ;;;;; absolute essentials `(bold ((,c :weight bold))) @@ -994,19 +1005,19 @@ Helper function for `ef-themes-preview-colors'." `(eww-form-text ((,c :inherit widget-field))) `(eww-form-textarea ((,c :inherit eww-form-text))) ;;;; flycheck - `(flycheck-error ((,c :underline (:style wave :color ,underline-err)))) + `(flycheck-error ((,c :inherit ef-themes-underline-error))) `(flycheck-fringe-error ((,c :inherit ef-themes-mark-delete))) `(flycheck-fringe-info ((,c :inherit ef-themes-mark-select))) `(flycheck-fringe-warning ((,c :inherit ef-themes-mark-other))) - `(flycheck-info ((,c :underline (:style wave :color ,underline-info)))) - `(flycheck-warning ((,c :underline (:style wave :color ,underline-warning)))) + `(flycheck-info ((,c :inherit ef-themes-underline-info))) + `(flycheck-warning ((,c :inherit ef-themes-underline-warning))) ;;;; flymake - `(flymake-error ((,c :underline (:style wave :color ,underline-err)))) - `(flymake-note ((,c :underline (:style wave :color ,underline-info)))) - `(flymake-warning ((,c :underline (:style wave :color ,underline-warning)))) + `(flymake-error ((,c :inherit ef-themes-underline-error))) + `(flymake-note ((,c :inherit ef-themes-underline-info))) + `(flymake-warning ((,c :inherit ef-themes-underline-warning))) ;;;; flyspell - `(flyspell-duplicate ((,c :underline (:style wave :color ,underline-warning)))) - `(flyspell-incorrect ((,c :underline (:style wave :color ,underline-err)))) + `(flyspell-duplicate ((,c :inherit ef-themes-underline-warning))) + `(flyspell-incorrect ((,c :inherit ef-themes-underline-error))) ;;;; font-lock `(font-lock-builtin-face ((,c :inherit bold :foreground ,builtin))) `(font-lock-comment-delimiter-face ((,c :inherit font-lock-comment-face)))