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.
This commit is contained in:
Lars Ingebrigtsen 2022-08-09 19:19:29 +02:00
parent 5269842833
commit b2bf91003d

View file

@ -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)