[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 59f5636 2/2: Unbreak M-x eldoc
From: |
João Távora |
Subject: |
master 59f5636 2/2: Unbreak M-x eldoc |
Date: |
Thu, 9 Jul 2020 13:08:10 -0400 (EDT) |
branch: master
commit 59f563680daa3e25db7c85c07bee020ac48b5fa5
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
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
---
lisp/emacs-lisp/eldoc.el | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 24b6cec..7c8e0e7 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -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