diff options
| -rw-r--r-- | lisp/emacs-lisp/eldoc.el | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 24b6ceca48a..7c8e0e71175 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Noah Friedman <friedman@splode.com> | 5 | ;; Author: Noah Friedman <friedman@splode.com> |
| 6 | ;; Keywords: extensions | 6 | ;; Keywords: extensions |
| 7 | ;; Created: 1995-10-06 | 7 | ;; Created: 1995-10-06 |
| 8 | ;; Version: 1.1.0 | 8 | ;; Version: 1.2.0 |
| 9 | ;; Package-Requires: ((emacs "26.3")) | 9 | ;; Package-Requires: ((emacs "26.3")) |
| 10 | 10 | ||
| 11 | ;; This is a GNU ELPA :core package. Avoid functionality that is not | 11 | ;; This is a GNU ELPA :core package. Avoid functionality that is not |
| @@ -712,19 +712,22 @@ endeavour to display the docstrings given to them." | |||
| 712 | (;; New protocol: trust callback will be called; | 712 | (;; New protocol: trust callback will be called; |
| 713 | t)))))) | 713 | t)))))) |
| 714 | 714 | ||
| 715 | (defun eldoc-print-current-symbol-info () | 715 | (defun eldoc-print-current-symbol-info (&optional interactive) |
| 716 | "Document thing at point." | 716 | "Document thing at point." |
| 717 | (interactive) | 717 | (interactive '(t)) |
| 718 | (if (not (eldoc-display-message-p)) | 718 | (cond (interactive |
| 719 | ;; Erase the last message if we won't display a new one. | 719 | (eldoc--invoke-strategy)) |
| 720 | (when eldoc-last-message | 720 | (t |
| 721 | (eldoc--message nil)) | 721 | (if (not (eldoc-display-message-p)) |
| 722 | (let ((non-essential t)) | 722 | ;; Erase the last message if we won't display a new one. |
| 723 | ;; Only keep looking for the info as long as the user hasn't | 723 | (when eldoc-last-message |
| 724 | ;; requested our attention. This also locally disables | 724 | (eldoc--message nil)) |
| 725 | ;; inhibit-quit. | 725 | (let ((non-essential t)) |
| 726 | (while-no-input | 726 | ;; Only keep looking for the info as long as the user hasn't |
| 727 | (eldoc--invoke-strategy))))) | 727 | ;; requested our attention. This also locally disables |
| 728 | ;; inhibit-quit. | ||
| 729 | (while-no-input | ||
| 730 | (eldoc--invoke-strategy))))))) | ||
| 728 | 731 | ||
| 729 | ;; When point is in a sexp, the function args are not reprinted in the echo | 732 | ;; When point is in a sexp, the function args are not reprinted in the echo |
| 730 | ;; area after every possible interactive command because some of them print | 733 | ;; area after every possible interactive command because some of them print |