Unbreak M-x eldoc
The command should always invoke Eldoc when called interactively, instead of going through the usual checks, which are performed to avoid interference with other commands. * lisp/emacs-lisp/eldoc.el (eldoc-print-current-symbol-info): Rework. (Version): Bump to 1.2.0
This commit is contained in:
parent
ffb99d8490
commit
59f563680d
1 changed files with 16 additions and 13 deletions
|
@ -5,7 +5,7 @@
|
|||
;; Author: Noah Friedman <friedman@splode.com>
|
||||
;; Keywords: extensions
|
||||
;; Created: 1995-10-06
|
||||
;; Version: 1.1.0
|
||||
;; Version: 1.2.0
|
||||
;; Package-Requires: ((emacs "26.3"))
|
||||
|
||||
;; This is a GNU ELPA :core package. Avoid functionality that is not
|
||||
|
@ -712,19 +712,22 @@ endeavour to display the docstrings given to them."
|
|||
(;; New protocol: trust callback will be called;
|
||||
t))))))
|
||||
|
||||
(defun eldoc-print-current-symbol-info ()
|
||||
(defun eldoc-print-current-symbol-info (&optional interactive)
|
||||
"Document thing at point."
|
||||
(interactive)
|
||||
(if (not (eldoc-display-message-p))
|
||||
;; Erase the last message if we won't display a new one.
|
||||
(when eldoc-last-message
|
||||
(eldoc--message nil))
|
||||
(let ((non-essential t))
|
||||
;; Only keep looking for the info as long as the user hasn't
|
||||
;; requested our attention. This also locally disables
|
||||
;; inhibit-quit.
|
||||
(while-no-input
|
||||
(eldoc--invoke-strategy)))))
|
||||
(interactive '(t))
|
||||
(cond (interactive
|
||||
(eldoc--invoke-strategy))
|
||||
(t
|
||||
(if (not (eldoc-display-message-p))
|
||||
;; Erase the last message if we won't display a new one.
|
||||
(when eldoc-last-message
|
||||
(eldoc--message nil))
|
||||
(let ((non-essential t))
|
||||
;; Only keep looking for the info as long as the user hasn't
|
||||
;; requested our attention. This also locally disables
|
||||
;; inhibit-quit.
|
||||
(while-no-input
|
||||
(eldoc--invoke-strategy)))))))
|
||||
|
||||
;; When point is in a sexp, the function args are not reprinted in the echo
|
||||
;; area after every possible interactive command because some of them print
|
||||
|
|
Loading…
Add table
Reference in a new issue