ui/pretty-code: fix wrong-number-of-args: eq error
And minor refactor
This commit is contained in:
parent
9f769fa985
commit
2fa8599364
1 changed files with 3 additions and 3 deletions
|
@ -21,12 +21,12 @@ function does nothing. Otherwise, it sets the value of
|
||||||
`prettify-code-symbols-alist' according to `+pretty-code-symbols-alist' for the
|
`prettify-code-symbols-alist' according to `+pretty-code-symbols-alist' for the
|
||||||
current major mode."
|
current major mode."
|
||||||
(unless (eq major-mode 'fundamental-mode)
|
(unless (eq major-mode 'fundamental-mode)
|
||||||
(when (or (eq +pretty-code-enabled-modes 't)
|
(when (or (eq +pretty-code-enabled-modes t)
|
||||||
(if (eq (car +pretty-code-enabled-modes 'not))
|
(if (eq (car +pretty-code-enabled-modes) 'not)
|
||||||
(not (memq major-mode (cdr +pretty-code-enabled-modes)))
|
(not (memq major-mode (cdr +pretty-code-enabled-modes)))
|
||||||
(memq major-mode +pretty-code-enabled-modes)))
|
(memq major-mode +pretty-code-enabled-modes)))
|
||||||
(setq prettify-symbols-alist
|
(setq prettify-symbols-alist
|
||||||
(append (alist-get major-mode +pretty-code-symbols-alist)
|
(append (cdr (assq major-mode +pretty-code-symbols-alist))
|
||||||
(default-value 'prettify-symbols-alist)))
|
(default-value 'prettify-symbols-alist)))
|
||||||
(when prettify-symbols-mode
|
(when prettify-symbols-mode
|
||||||
(prettify-symbols-mode -1))
|
(prettify-symbols-mode -1))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue