set-pretty-symbols!: rename rest -> plist
A more sensibile name.
This commit is contained in:
parent
3d6b30675c
commit
e3a0ad0b33
1 changed files with 7 additions and 7 deletions
|
@ -58,7 +58,7 @@ correct width of the symbols instead of the width measured by `char-width'."
|
|||
(cons (car ligature-alist) acc)))
|
||||
|
||||
;;;###autodef
|
||||
(defun set-pretty-symbols! (modes &rest rest)
|
||||
(defun set-pretty-symbols! (modes &rest plist)
|
||||
"Associates string patterns with icons in certain major-modes.
|
||||
|
||||
MODES is a major mode symbol or a list of them.
|
||||
|
@ -88,17 +88,17 @@ Pretty symbols can be unset for emacs-lisp-mode with:
|
|||
|
||||
(set-pretty-symbols! 'emacs-lisp-mode nil)"
|
||||
(declare (indent defun))
|
||||
(if (null (car-safe rest))
|
||||
(if (null (car-safe plist))
|
||||
(delq (assq mode +pretty-code-symbols-alist)
|
||||
+pretty-code-symbols-alist)
|
||||
(let (results merge key)
|
||||
(while rest
|
||||
(pcase (setq key (pop rest))
|
||||
(:merge (setq merge (pop rest)))
|
||||
(:alist (setq results (append (pop rest) results)))
|
||||
(while plist
|
||||
(pcase (setq key (pop plist))
|
||||
(:merge (setq merge (pop plist)))
|
||||
(:alist (setq results (append (pop plist) results)))
|
||||
(_
|
||||
(when-let* ((char (plist-get +pretty-code-symbols key)))
|
||||
(push (cons (pop rest) char) results)))))
|
||||
(push (cons (pop plist) char) results)))))
|
||||
(dolist (mode (doom-enlist modes))
|
||||
(unless merge
|
||||
(delq (assq mode +pretty-code-symbols-alist)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue