emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master b2bf91003d 3/3: Further lisp-current-defun-name tweaks


From: Lars Ingebrigtsen
Subject: master b2bf91003d 3/3: Further lisp-current-defun-name tweaks
Date: Tue, 9 Aug 2022 13:21:43 -0400 (EDT)

branch: master
commit b2bf91003db3bc2171c566ed710ec34d4a55c064
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 lisp/emacs-lisp/lisp-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 1bc2c0ece6..c31fbec640 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]