From 902db7adf5369dd8c0c4179a744da546279b8217 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 1 Jan 2021 10:54:26 -0600 Subject: Add cussface --- config.org | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'config.org') diff --git a/config.org b/config.org index 2b9671d..c07f5e5 100644 --- a/config.org +++ b/config.org @@ -101,6 +101,24 @@ doesn't work, I'll call git directly and clone the repo myself. ',var ,val)) #+END_SRC +*** Emulate use-package’s =:custom-face=, but better + +#+begin_src emacs-lisp + (defvar acdw--custom-faces () + "List of custom faces to run through acdw/set-custom-faces.") + + (defun acdw/set-custom-faces () + "Run `customize-set-faces' on `acdw--custom-faces'." + (message "%s" "Customizing faces...") + (apply #'custom-set-faces acdw--custom-faces)) + + (defun cussface (spec) + "Add SPEC to `acdw--custom-faces', and add a hook to run + `acdw/set-custom-faces' after init." + (add-to-list 'acdw--custom-faces spec) + (add-hook 'after-init-hook #'acdw/set-custom-faces)) +#+end_src + ** Clean =.emacs.d= #+BEGIN_SRC emacs-lisp -- cgit 1.4.1-21-gabe81