From dd6fa00fa3108ffd9d9848310a51575aae85e25d Mon Sep 17 00:00:00 2001 From: Anders Lindgren Date: Wed, 19 Aug 2020 14:19:12 +0200 Subject: [PATCH] Fix #'(lambda ...) font locking * lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p): Fontize #'(lambda ...) better (bug#23465). --- lisp/emacs-lisp/lisp-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index d0c28ec5dc7..584ed8c6f90 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -200,7 +200,9 @@ (save-excursion (ignore-errors (goto-char pos) - (or (eql (char-before) ?\') + ;; '(lambda ..) is not a funcall position, but #'(lambda ...) is. + (or (and (eql (char-before) ?\') + (not (eql (char-before (1- (point))) ?#))) (let* ((ppss (syntax-ppss)) (paren-posns (nth 9 ppss)) (parent -- 2.39.5