From: Lars Ingebrigtsen Date: Fri, 20 May 2022 01:46:35 +0000 (+0200) Subject: Fix font-locking of (defun foo (function ...)) X-Git-Tag: emacs-29.0.90~1910^2~574 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de9dfb1939caba80fd4acc42789794f5c9273df8;p=emacs.git 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). --- 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.