Subject: bug#16920: closed (Re: bug#16920: 24.3; fix eldoc-message to clear own message only)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 10 Mar 2014 05:38:02 +0000

Your bug report

#16920: 24.3; fix eldoc-message to clear own message only

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
16920: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16920
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#16920: 24.3; fix eldoc-message to clear own message only
From: Leo Liu <[email-masked]>
To: Stefan Monnier <[email-masked]>
Cc: [email-masked]
Date: Mon, 10 Mar 2014 13:37:13 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Fixed in 24.4

On 2014-03-10 10:44 +0800, Stefan Monnier wrote:
> Sounds good, thanks,
>         Stefan

OK, installed.

Leo

Subject: 24.3; fix eldoc-message to clear own message only
From: Leo Liu <[email-masked]>
To: [email-masked]
Date: Sun, 02 Mar 2014 15:18:10 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

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)