mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
set-pretty-symbols!: rename rest -> plist
A more sensibile name.
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user