summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mode.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-08-09 19:19:29 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-08-09 19:21:36 +0200
commitb2bf91003db3bc2171c566ed710ec34d4a55c064 (patch)
tree206f230481a69eaecc2f32026955f61c7c6f98aa /lisp/emacs-lisp/lisp-mode.el
parent5269842833471c960352ced3c60ce2329660b8cf (diff)
downloademacs-b2bf91003db3bc2171c566ed710ec34d4a55c064.tar.gz
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.
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r--lisp/emacs-lisp/lisp-mode.el2
1 files changed, 1 insertions, 1 deletions
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)