Further lisp-current-defun-name tweaks
* lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Further tweaks to finding the symbol being defined (defalias).
This commit is contained in:
parent
ffc81ebc4b
commit
909931cb9a
1 changed files with 6 additions and 2 deletions
|
@ -776,8 +776,12 @@ decided heuristically.)"
|
|||
(when (and (not name)
|
||||
(string-match-p "\\`def" (symbol-name symbol)))
|
||||
(when-let ((candidate (ignore-errors (read (current-buffer)))))
|
||||
(when (symbolp candidate)
|
||||
(setq name candidate))))
|
||||
(cond
|
||||
((symbolp candidate)
|
||||
(setq name candidate))
|
||||
((and (consp candidate)
|
||||
(symbolp (car (delete 'quote candidate))))
|
||||
(setq name (car (delete 'quote candidate)))))))
|
||||
(when-let ((result (or name symbol)))
|
||||
(symbol-name result)))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue