diff options
Diffstat (limited to 'elisp.el')
-rw-r--r-- | elisp.el | 33 |
1 files changed, 28 insertions, 5 deletions
@@ -40,16 +40,39 @@ (search-forward "\"" end t)) ((nth 4 ppss) ; comments (forward-line +1)) - ((let ((symbol (intern-soft (match-string-no-properties 0)))) + ((let* ((symbol (intern-soft (match-string-no-properties 0))) + (paren-starts (nth 9 ppss))) (and (cond ((null symbol) nil) ((eq symbol t) nil) ((keywordp symbol) nil) ((special-variable-p symbol) (setq emacs-lisp-face 'font-lock-variable-name-face)) - ((and (fboundp symbol) - (eq (char-before (match-beginning 0)) ?\() - (not (memq (char-before (1- (match-beginning 0))) - (list ?\' ?\`)))) + ((let ((quote-before-p + (mapcar + (function + (lambda (start) + (let ((temp-char (char-before start))) + (cond + ((eq temp-char ?`) 1) + ((eq temp-char ?') 2))))) + paren-starts))) + (and (fboundp symbol) + (eq (char-before (match-beginning 0)) ?\() + (not + (or (memq 2 quote-before-p) + (and (memq 1 quote-before-p) + (not + (or (eq (char-before + (max (1- (match-beginning 0)) + (point-min))) + ?,) + (eq (char-before + (max (- (match-beginning 0) 2) + (point-min))) + ?,)))))) + ;; (not (memq (char-before (1- (match-beginning 0))) + ;; (list ?\' ?\`))) + )) (let ((unaliased (indirect-function symbol))) (cond ((special-form-p unaliased) (setq emacs-lisp-face 'font-lock-constant-face)) |