aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/config.org
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-07-13 15:36:56 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-07-13 15:36:56 +0100
commit0d0f292d28b68c9e806d7f2f25c7e1f203a4ac2b (patch)
treefc4b72540fdc80b3735d3a39d8609a2ad10922dc /Emacs/.config/emacs/config.org
parentad2d621f646be236b1ce783ed42796a19c8e234c (diff)
downloaddotfiles-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.org24
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" . "ℓ")