From: Lars Ingebrigtsen Date: Tue, 9 Aug 2022 17:19:29 +0000 (+0200) Subject: Further lisp-current-defun-name tweaks X-Git-Tag: emacs-29.0.90~1447^2~281^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b2bf91003db3bc2171c566ed710ec34d4a55c064;p=emacs.git Further lisp-current-defun-name tweaks * lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Tweak so that cl-defmethod and friends work again. --- diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 1bc2c0ece6d..c31fbec640c 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -774,7 +774,7 @@ decided heuristically.)" ;; name). If the symbol starts with \"def\", then it's ;; likely that the next symbol is the name. (when (and (not name) - (string-match-p "\\`def" (symbol-name symbol))) + (string-match-p "\\(\\`\\|-\\)def" (symbol-name symbol))) (when-let ((candidate (ignore-errors (read (current-buffer))))) (cond ((symbolp candidate)