From b33c882ba69bf530f5a055bcbab26e392d51e6f5 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 24 Jan 2021 23:26:00 -0600 Subject: Add doremi-face-set for setting face --- config.org | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/config.org b/config.org index d37139c..5ef0f1f 100644 --- a/config.org +++ b/config.org @@ -470,6 +470,20 @@ minor-modes from the modeline. :repo "raxod502/blackout")) #+end_src +*** Setting faces + +It took me a while to find a function that'll let me customize faces +/without/ using *customize*. Thanks to [[https://www.emacswiki.org/emacs/CustomizingFaces#toc5][Drew Adams]], I've got it! + +#+begin_src emacs-lisp :noweb-ref functions + (defun doremi-face-set (face spec) + "Tell Customize that FACE has been set to value SPEC. + SPEC is as for `defface'." + (put face 'customized-face spec) + (face-spec-set face spec) + (message "Customized face %s." (symbol-name face))) +#+end_src + * Interactivity ** Dialogs and alerts -- cgit 1.4.1-21-gabe81