diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-07-13 15:36:56 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-07-13 15:36:56 +0100 |
commit | 0d0f292d28b68c9e806d7f2f25c7e1f203a4ac2b (patch) | |
tree | fc4b72540fdc80b3735d3a39d8609a2ad10922dc /Emacs/.config/emacs/config.org | |
parent | ad2d621f646be236b1ce783ed42796a19c8e234c (diff) | |
download | dotfiles-0d0f292d28b68c9e806d7f2f25c7e1f203a4ac2b.tar.gz dotfiles-0d0f292d28b68c9e806d7f2f25c7e1f203a4ac2b.tar.bz2 dotfiles-0d0f292d28b68c9e806d7f2f25c7e1f203a4ac2b.zip |
(Emacs)~let/while -> mapcar for :pretty use-package
Same idiomatic change for use-package handling. Should've realised
this earlier.
Diffstat (limited to 'Emacs/.config/emacs/config.org')
-rw-r--r-- | Emacs/.config/emacs/config.org | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 82d36fe..b7b956e 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -904,24 +904,20 @@ for an example. (defun use-package-handler/:pretty (name _keyword args rest state) (use-package-concat (use-package-process-keywords name rest state) - (let ((arg args) - (forms nil)) - (while arg - (let ((mode (caar arg)) - (rest (cdr (car arg)))) - (add-to-list - 'forms + (mapcar + #'(lambda (arg) + (let ((mode (car arg)) + (rest (cdr arg))) `(add-hook ',mode - (lambda nil - (setq prettify-symbols-alist ',rest) - (prettify-symbols-mode))))) - (setq arg (cdr arg))) - forms))))) + #'(lambda nil + (setq prettify-symbols-alist ',rest) + (prettify-symbols-mode))))) + args))))) #+end_src -Here's a collection of keywords and their associated symbols, for a -pseudo language. +Here's a collection of keywords and possible associated symbols for +any prog language of choice. Mostly for reference and copying. #+begin_example ("null" . "Ø") ("list" . "ℓ") |