diff options
-rw-r--r-- | elisp.el | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -45,6 +45,28 @@ (and (cond ((null symbol) nil) ((eq symbol t) nil) ((keywordp symbol) nil) + ((let ((start (match-beginning 0))) + (and (fboundp symbol) + (eq (char-before (max (point-min) + start)) + ?') + (eq (char-before (max (point-min) + (1- start))) + ?#))) + (let ((unaliased (indirect-function symbol))) + (cond ((special-form-p unaliased) + (setq emacs-lisp-face 'font-lock-constant-face)) + ((macrop unaliased) + (setq emacs-lisp-face 'font-lock-keyword-face)) + (t + (let (unadvised) + (while (not (eq (setq unadvised (ad-get-orig-definition unaliased)) + (setq unaliased (indirect-function unadvised))))) + unaliased) + (setq emacs-lisp-face + (if (subrp unaliased) + 'font-lock-builtin-face + 'font-lock-function-name-face)))))) ((special-variable-p symbol) (setq emacs-lisp-face 'font-lock-variable-name-face)) ((let ((quote-before-p |