mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
lang/emacs-lisp: optimize symbol fontification
By ignoring symbols in comments and strings.
This commit is contained in:
@ -64,6 +64,9 @@ Functions are differentiated into special forms, built-in functions and
|
||||
library/userland functions"
|
||||
(catch 'matcher
|
||||
(while (re-search-forward "\\_<.+?\\_>" end t)
|
||||
(unless (save-excursion
|
||||
(let ((ppss (syntax-ppss)))
|
||||
(or (nth 3 ppss) (nth 4 ppss))))
|
||||
(let ((symbol (intern-soft (match-string-no-properties 0))))
|
||||
(and (cond ((null symbol) nil)
|
||||
((eq symbol t) nil)
|
||||
@ -82,7 +85,7 @@ library/userland functions"
|
||||
(if (subrp unaliased)
|
||||
'font-lock-constant-face
|
||||
'font-lock-function-name-face))))))
|
||||
(throw 'matcher t))))
|
||||
(throw 'matcher t)))))
|
||||
nil))
|
||||
(eval-when-compile
|
||||
(byte-compile #'+emacs-lisp-highlight-vars-and-faces))
|
||||
|
Reference in New Issue
Block a user