diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-08-09 19:19:29 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-08-09 19:21:36 +0200 |
commit | b2bf91003db3bc2171c566ed710ec34d4a55c064 (patch) | |
tree | 206f230481a69eaecc2f32026955f61c7c6f98aa /lisp/emacs-lisp/lisp-mode.el | |
parent | 5269842833471c960352ced3c60ce2329660b8cf (diff) | |
download | emacs-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.el | 2 |
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) |