summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elisp.el22
1 files changed, 22 insertions, 0 deletions
diff --git a/elisp.el b/elisp.el
index c1c62fb..c944040 100644
--- a/elisp.el
+++ b/elisp.el
@@ -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