[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116095: * lisp/emacs-lisp/eldoc.el: Properly remove
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] trunk r116095: * lisp/emacs-lisp/eldoc.el: Properly remove message in minibuffer case. |
Date: |
Tue, 21 Jan 2014 13:10:04 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116095
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2014-01-21 08:09:55 -0500
message:
* lisp/emacs-lisp/eldoc.el: Properly remove message in minibuffer case.
(eldoc--message-command-p): New function.
(eldoc-display-message-p): Use it.
(eldoc-pre-command-refresh-echo-area): In the minibuffer case, the
message is not automatically erased for us.
(eldoc-print-current-symbol-info): Erase previous message, if any.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/emacs-lisp/eldoc.el eldoc.el-20091113204419-o5vbwnq5f7feedwu-952
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-01-21 08:49:46 +0000
+++ b/lisp/ChangeLog 2014-01-21 13:09:55 +0000
@@ -1,10 +1,19 @@
+2014-01-21 Stefan Monnier <address@hidden>
+
+ * emacs-lisp/eldoc.el: Properly remove message in minibuffer case.
+ (eldoc--message-command-p): New function.
+ (eldoc-display-message-p): Use it.
+ (eldoc-pre-command-refresh-echo-area): In the minibuffer case, the
+ message is not automatically erased for us.
+ (eldoc-print-current-symbol-info): Erase previous message, if any.
+
2014-01-21 Tassilo Horn <address@hidden>
* textmodes/reftex.el (reftex-create-bibtex-file): Fix autoload to
specify it's an interactive function.
- * textmodes/reftex-cite.el (reftex-all-used-citation-keys): Fix
- regex used for scanning for citation keys which failed for
+ * textmodes/reftex-cite.el (reftex-all-used-citation-keys):
+ Fix regex used for scanning for citation keys which failed for
citations with optional arguments.
2014-01-21 Leo Liu <address@hidden>
@@ -89,8 +98,8 @@
2014-01-17 Dmitry Gutov <address@hidden>
* progmodes/ruby-mode.el (ruby-alignable-keywords): New constant.
- (ruby-align-to-stmt-keywords): Change the default value. Use
- `ruby-alignable-keywords' to generate the possible customization
+ (ruby-align-to-stmt-keywords): Change the default value.
+ Use `ruby-alignable-keywords' to generate the possible customization
choices.
(ruby-smie-rules): Instead of using a hardcoded list of alignable
keywords, check against the value of `ruby-alignable-keywords'
=== modified file 'lisp/emacs-lisp/eldoc.el'
--- a/lisp/emacs-lisp/eldoc.el 2014-01-12 10:29:59 +0000
+++ b/lisp/emacs-lisp/eldoc.el 2014-01-21 13:09:55 +0000
@@ -152,7 +152,7 @@
"Idle time delay currently in use by timer.
This is used to determine if `eldoc-idle-delay' is changed by the user.")
-(defvar eldoc-message-function 'eldoc-minibuffer-message
+(defvar eldoc-message-function #'eldoc-minibuffer-message
"The function used by `eldoc-message' to display messages.
It should receive the same arguments as `message'.")
@@ -193,10 +193,7 @@
(remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t)))
;;;###autoload
-(defun turn-on-eldoc-mode ()
- "Unequivocally turn on ElDoc mode (see command `eldoc-mode')."
- (interactive)
- (eldoc-mode 1))
+(define-obsolete-function-alias 'turn-on-eldoc-mode 'eldoc-mode "24.4")
(defun eldoc-schedule-timer ()
@@ -260,6 +257,10 @@
(omessage (funcall eldoc-message-function nil)))))
eldoc-last-message)
+(defun eldoc--message-command-p (command)
+ (and (symbolp command)
+ (intern-soft (symbol-name command) eldoc-message-commands)))
+
;; This function goes on pre-command-hook for XEmacs or when using idle
;; timers in Emacs. Motion commands clear the echo area for some reason,
;; which make eldoc messages flicker or disappear just before motion
@@ -268,10 +269,12 @@
;; This doesn't seem to be required for Emacs 19.28 and earlier.
(defun eldoc-pre-command-refresh-echo-area ()
(and eldoc-last-message
+ (not (minibufferp)) ;We don't use the echo area when in minibuffer.
(if (and (eldoc-display-message-no-interference-p)
- (symbolp this-command)
- (intern-soft (symbol-name this-command) eldoc-message-commands))
+ (eldoc--message-command-p this-command))
(eldoc-message eldoc-last-message)
+ ;; No need to call eldoc-message since the echo area will be cleared
+ ;; for us, but do note that the last-message will be gone.
(setq eldoc-last-message nil))))
;; Decide whether now is a good time to display a message.
@@ -281,10 +284,9 @@
;; timer, we're still in the middle of executing a command,
;; e.g. a query-replace where it would be annoying to
;; overwrite the echo area.
- (and (not this-command)
- (symbolp last-command)
- (intern-soft (symbol-name last-command)
- eldoc-message-commands))))
+ (not this-command)
+ (eldoc--message-command-p last-command)))
+
;; Check various conditions about the current environment that might make
;; it undesirable to print eldoc messages right this instant.
@@ -313,7 +315,11 @@
;; This is run from post-command-hook or some idle timer thing,
;; so we need to be careful that errors aren't ignored.
(with-demoted-errors "eldoc error: %s"
- (and (eldoc-display-message-p)
+ (and (or (eldoc-display-message-p)
+ ;; Erase the last message if we won't display a new one.
+ (when eldoc-last-message
+ (eldoc-message nil)
+ nil))
(if eldoc-documentation-function
(eldoc-message (funcall eldoc-documentation-function))
(let* ((current-symbol (eldoc-current-symbol))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116095: * lisp/emacs-lisp/eldoc.el: Properly remove message in minibuffer case.,
Stefan Monnier <=