unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16920: 24.3; fix eldoc-message to clear own message only
@ 2014-03-02  7:18 Leo Liu
  2014-03-07 22:54 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Liu @ 2014-03-02  7:18 UTC (permalink / raw)
  To: 16920

I would like to fix eldoc-message for the upcoming release. Now that
eldoc can be used in the minibuffer there is one issue that can be
really annoying.

1. M-x eval-expression
2. type in (+ 1 1 |) ; | is the cursor
3. quickly pressing SPC repeatedly and then RET

The value 2 is shown and then cleared by eldoc (when eldoc-idle-delay is
short enough one may not see the value at all). The proposed fix is in
the following patch. Comments or objections?

=== modified file 'lisp/emacs-lisp/eldoc.el'
--- lisp/emacs-lisp/eldoc.el	2014-01-30 07:54:28 +0000
+++ lisp/emacs-lisp/eldoc.el	2014-03-02 07:14:45 +0000
@@ -255,7 +255,8 @@
     (let ((message-log-max nil))
       (cond (eldoc-last-message
 	     (funcall eldoc-message-function "%s" eldoc-last-message))
-	    (omessage (funcall eldoc-message-function nil)))))
+	    (omessage (and (equal omessage (current-message))
+			   (funcall eldoc-message-function nil))))))
   eldoc-last-message)
 
 (defun eldoc--message-command-p (command)





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-10  5:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-02  7:18 bug#16920: 24.3; fix eldoc-message to clear own message only Leo Liu
2014-03-07 22:54 ` Stefan Monnier
2014-03-08  7:32   ` Leo Liu
2014-03-10  2:44     ` Stefan Monnier
2014-03-10  5:37       ` Leo Liu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).