diff options
Diffstat (limited to 'Emacs/.config')
-rw-r--r-- | Emacs/.config/emacs/config.org | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index e0d844d..e750047 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -644,6 +644,29 @@ packages can leverage it. :init (setq prettify-symbols-unprettify-at-point t) :config + (with-eval-after-load "use-package-core" + (add-to-list 'use-package-keywords ':pretty) + (defun use-package-normalize/:pretty (_name-symbol _keyword args) + args) + + (defun use-package-handler/:pretty (name _keyword args rest state) + (use-package-concat + (use-package-process-keywords name rest state) + (let ((arg args) + forms) + (while arg + (let ((mode (car arg)) + (rest (cdr arg))) + (add-to-list + 'forms + `(add-hook + ',mode + (lambda () + (setq prettify-symbols-alist ',rest) + (prettify-symbols-mode))))) + (setq arg (cdr arg))) + forms)))) + (defmacro +pretty/set-alist (mode &rest symbols) `(add-hook ',mode |