emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4e4e550: * lisp/subr.el (read-char-from-minibuffer, y-or-n-p): Re


From: Juri Linkov
Subject: master 4e4e550: * lisp/subr.el (read-char-from-minibuffer, y-or-n-p): Remove discard-input.
Date: Sun, 17 Nov 2019 16:52:02 -0500 (EST)

branch: master
commit 4e4e5508582b1b5a2e738f4490400f2d78a5f343
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * lisp/subr.el (read-char-from-minibuffer, y-or-n-p): Remove discard-input.
    
    (do-after-load-evaluation): Replace run-with-timer with     
run-with-idle-timer
    to give a chance for the minibuffer to handle initial events before sit-for.
    https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg00581.html
---
 lisp/subr.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index eaec223..20daed6 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2707,7 +2707,6 @@ When CHARS is non-nil, any input that is not one of CHARS 
is ignored.
 When HISTORY is a symbol, then allows navigating in a history.
 The navigation commands are `M-p' and `M-n', with `RET' to select
 a character from history."
-  (discard-input)
   (let* ((empty-history '())
          (map (if (consp chars)
                   (or (gethash chars read-char-from-minibuffer-map-hash)
@@ -2847,7 +2846,6 @@ is nil and `use-dialog-box' is non-nil."
            answer (x-popup-dialog t `(,prompt ("Yes" . act) ("No" . skip)))))
      (t
       (setq prompt (funcall padded prompt))
-      (discard-input)
       (let* ((empty-history '())
              (str (read-from-minibuffer
                    prompt nil
@@ -4622,7 +4620,7 @@ This function is called directly from the C code."
                                          byte-compile-current-file
                                          byte-compile-root-dir)))
              (byte-compile-warn "%s" msg))
-         (run-with-timer 0 nil
+         (run-with-idle-timer 0 nil
                          (lambda (msg)
                            (minibuffer-message "%s" msg))
                          msg)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]