all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Liu <sdl.web@gmail.com>
To: 16920@debbugs.gnu.org
Subject: bug#16920: 24.3; fix eldoc-message to clear own message only
Date: Sun, 02 Mar 2014 15:18:10 +0800	[thread overview]
Message-ID: <m14n3hoyq5.fsf@gmail.com> (raw)

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)





             reply	other threads:[~2014-03-02  7:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-02  7:18 Leo Liu [this message]
2014-03-07 22:54 ` bug#16920: 24.3; fix eldoc-message to clear own message only Stefan Monnier
2014-03-08  7:32   ` Leo Liu
2014-03-10  2:44     ` Stefan Monnier
2014-03-10  5:37       ` Leo Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m14n3hoyq5.fsf@gmail.com \
    --to=sdl.web@gmail.com \
    --cc=16920@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.