diff options
| author | Stefan Monnier | 2018-12-04 18:15:44 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2018-12-04 18:15:44 -0500 |
| commit | 12e922156c86a26fa4bb2cb9e7d2b3fd639e4707 (patch) | |
| tree | 0b95b71ddfd95a487cc4791d9b3d14687f5c5db6 | |
| parent | 6d898918980be4cb29a182ecde7f8e1f95a08462 (diff) | |
| download | emacs-12e922156c86a26fa4bb2cb9e7d2b3fd639e4707.tar.gz emacs-12e922156c86a26fa4bb2cb9e7d2b3fd639e4707.zip | |
* lisp/emacs-lisp/eldoc.el: Let the user interrupt the search
(eldoc-print-current-symbol-info): Use while-no-input and non-essential.
| -rw-r--r-- | lisp/emacs-lisp/eldoc.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 49ba71fb1b8..21be4f3ce32 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el | |||
| @@ -357,12 +357,15 @@ return any documentation.") | |||
| 357 | ;; This is run from post-command-hook or some idle timer thing, | 357 | ;; This is run from post-command-hook or some idle timer thing, |
| 358 | ;; so we need to be careful that errors aren't ignored. | 358 | ;; so we need to be careful that errors aren't ignored. |
| 359 | (with-demoted-errors "eldoc error: %s" | 359 | (with-demoted-errors "eldoc error: %s" |
| 360 | (and (or (eldoc-display-message-p) | 360 | (if (not (eldoc-display-message-p)) |
| 361 | ;; Erase the last message if we won't display a new one. | 361 | ;; Erase the last message if we won't display a new one. |
| 362 | (when eldoc-last-message | 362 | (when eldoc-last-message |
| 363 | (eldoc-message nil) | 363 | (eldoc-message nil)) |
| 364 | nil)) | 364 | (let ((non-essential t)) |
| 365 | (eldoc-message (funcall eldoc-documentation-function))))) | 365 | ;; Only keep looking for the info as long as the user hasn't |
| 366 | ;; requested our attention. This also locally disables inhibit-quit. | ||
| 367 | (while-no-input | ||
| 368 | (eldoc-message (funcall eldoc-documentation-function))))))) | ||
| 366 | 369 | ||
| 367 | ;; If the entire line cannot fit in the echo area, the symbol name may be | 370 | ;; If the entire line cannot fit in the echo area, the symbol name may be |
| 368 | ;; truncated or eliminated entirely from the output to make room for the | 371 | ;; truncated or eliminated entirely from the output to make room for the |