lang/emacs-lisp: polish symbol fontification
Follow up on 76b4af99
; resolves "flickering christmas lights" issue
where symbols were incorrectly fontified with the last face while typing
them.
This commit is contained in:
parent
e348e32cbc
commit
631f075a82
1 changed files with 10 additions and 9 deletions
|
@ -63,7 +63,8 @@ library/userland functions"
|
||||||
(catch 'matcher
|
(catch 'matcher
|
||||||
(while (re-search-forward "\\_<.+?\\_>" end t)
|
(while (re-search-forward "\\_<.+?\\_>" end t)
|
||||||
(let ((symbol (intern-soft (match-string-no-properties 0))))
|
(let ((symbol (intern-soft (match-string-no-properties 0))))
|
||||||
(and (cond ((null symbol))
|
(and (cond ((null symbol) nil)
|
||||||
|
((eq symbol t) nil)
|
||||||
((special-variable-p symbol)
|
((special-variable-p symbol)
|
||||||
(setq +emacs-lisp--face 'font-lock-variable-name-face))
|
(setq +emacs-lisp--face 'font-lock-variable-name-face))
|
||||||
((and (fboundp symbol)
|
((and (fboundp symbol)
|
||||||
|
@ -71,14 +72,14 @@ library/userland functions"
|
||||||
(let ((unaliased (indirect-function symbol t)))
|
(let ((unaliased (indirect-function symbol t)))
|
||||||
(unless (or (macrop unaliased)
|
(unless (or (macrop unaliased)
|
||||||
(special-form-p unaliased))
|
(special-form-p unaliased))
|
||||||
(let ((orig (let (unadvised)
|
(let (unadvised)
|
||||||
(while (not (eq (setq unadvised (ad-get-orig-definition unaliased))
|
(while (not (eq (setq unadvised (ad-get-orig-definition unaliased))
|
||||||
(setq unaliased (indirect-function unadvised t)))))
|
(setq unaliased (indirect-function unadvised t)))))
|
||||||
unaliased)))
|
unaliased)
|
||||||
(setq +emacs-lisp--face
|
(setq +emacs-lisp--face
|
||||||
(if (subrp orig)
|
(if (subrp unaliased)
|
||||||
'font-lock-constant-face
|
'font-lock-constant-face
|
||||||
'font-lock-function-name-face)))))))
|
'font-lock-function-name-face))))))
|
||||||
(throw 'matcher t))))
|
(throw 'matcher t))))
|
||||||
nil))
|
nil))
|
||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue