summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mode.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-05-20 03:46:35 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-05-20 03:46:35 +0200
commitde9dfb1939caba80fd4acc42789794f5c9273df8 (patch)
tree455172cef99e92645c8ee45c5fc20af0ddbf2e8f /lisp/emacs-lisp/lisp-mode.el
parent871f0f0a5de2b30944348ad9bf708cb8611b27fe (diff)
downloademacs-de9dfb1939caba80fd4acc42789794f5c9273df8.tar.gz
Fix font-locking of (defun foo (function ...))
* lisp/emacs-lisp/lisp-mode.el (lisp--el-funcall-position-p): Don't colorize the `function' in (defun foo (function ...)) as a special form (bug#37074).
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r--lisp/emacs-lisp/lisp-mode.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 5dd2f5162ed..5b93f145e89 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -244,6 +244,9 @@
('let
(forward-sexp 1)
(>= pos (point)))
+ ((or 'defun 'defmacro 'cl-defmethod 'cl-defun)
+ (forward-sexp 2)
+ (>= pos (point)))
('condition-case
;; If (cdr paren-posns), then we're in the BODY
;; of HANDLERS.