From de9dfb1939caba80fd4acc42789794f5c9273df8 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 20 May 2022 03:46:35 +0200 Subject: [PATCH] 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). --- lisp/emacs-lisp/lisp-mode.el | 3 +++ 1 file changed, 3 insertions(+) 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. -- 2.39.2