diff options
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index c31fbec640c..c56a9660e7c 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -760,7 +760,9 @@ decided heuristically.)" | |||
| 760 | ;; If there's an edebug spec, use that to determine what the | 760 | ;; If there's an edebug spec, use that to determine what the |
| 761 | ;; name is. | 761 | ;; name is. |
| 762 | (when symbol | 762 | (when symbol |
| 763 | (let ((spec (get symbol 'edebug-form-spec))) | 763 | (let ((spec (or (get symbol 'edebug-form-spec) |
| 764 | (and (eq (get symbol 'lisp-indent-function) 'defun) | ||
| 765 | (get 'defun 'edebug-form-spec))))) | ||
| 764 | (save-excursion | 766 | (save-excursion |
| 765 | (when (and (eq (car-safe spec) '&define) | 767 | (when (and (eq (car-safe spec) '&define) |
| 766 | (memq 'name spec)) | 768 | (memq 'name spec)) |
| @@ -768,6 +770,9 @@ decided heuristically.)" | |||
| 768 | (while (and spec (not name)) | 770 | (while (and spec (not name)) |
| 769 | (let ((candidate (ignore-errors (read (current-buffer))))) | 771 | (let ((candidate (ignore-errors (read (current-buffer))))) |
| 770 | (when (eq (pop spec) 'name) | 772 | (when (eq (pop spec) 'name) |
| 773 | (when (and (consp candidate) | ||
| 774 | (symbolp (car (delete 'quote candidate)))) | ||
| 775 | (setq candidate (car (delete 'quote candidate)))) | ||
| 771 | (setq name candidate | 776 | (setq name candidate |
| 772 | spec nil)))))))) | 777 | spec nil)))))))) |
| 773 | ;; We didn't have an edebug spec (or couldn't find the | 778 | ;; We didn't have an edebug spec (or couldn't find the |
| @@ -783,7 +788,7 @@ decided heuristically.)" | |||
| 783 | (symbolp (car (delete 'quote candidate)))) | 788 | (symbolp (car (delete 'quote candidate)))) |
| 784 | (setq name (car (delete 'quote candidate))))))) | 789 | (setq name (car (delete 'quote candidate))))))) |
| 785 | (when-let ((result (or name symbol))) | 790 | (when-let ((result (or name symbol))) |
| 786 | (symbol-name result))))))) | 791 | (and (symbolp result) (symbol-name result)))))))) |
| 787 | 792 | ||
| 788 | (defvar-keymap lisp-mode-shared-map | 793 | (defvar-keymap lisp-mode-shared-map |
| 789 | :doc "Keymap for commands shared by all sorts of Lisp modes." | 794 | :doc "Keymap for commands shared by all sorts of Lisp modes." |