aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2019-11-17 23:51:55 +0200
committerJuri Linkov2019-11-17 23:51:55 +0200
commit4e4e5508582b1b5a2e738f4490400f2d78a5f343 (patch)
tree61be83db6f02abdba9d0f46dd8864f4247dcf82d
parenta8f2ee424ce895caff15f1ff973e241b8a946aba (diff)
downloademacs-4e4e5508582b1b5a2e738f4490400f2d78a5f343.tar.gz
emacs-4e4e5508582b1b5a2e738f4490400f2d78a5f343.zip
* 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
-rw-r--r--lisp/subr.el4
1 files changed, 1 insertions, 3 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index eaec2235853..20daed623fe 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.
2707When HISTORY is a symbol, then allows navigating in a history. 2707When HISTORY is a symbol, then allows navigating in a history.
2708The navigation commands are `M-p' and `M-n', with `RET' to select 2708The navigation commands are `M-p' and `M-n', with `RET' to select
2709a character from history." 2709a character from history."
2710 (discard-input)
2711 (let* ((empty-history '()) 2710 (let* ((empty-history '())
2712 (map (if (consp chars) 2711 (map (if (consp chars)
2713 (or (gethash chars read-char-from-minibuffer-map-hash) 2712 (or (gethash chars read-char-from-minibuffer-map-hash)
@@ -2847,7 +2846,6 @@ is nil and `use-dialog-box' is non-nil."
2847 answer (x-popup-dialog t `(,prompt ("Yes" . act) ("No" . skip))))) 2846 answer (x-popup-dialog t `(,prompt ("Yes" . act) ("No" . skip)))))
2848 (t 2847 (t
2849 (setq prompt (funcall padded prompt)) 2848 (setq prompt (funcall padded prompt))
2850 (discard-input)
2851 (let* ((empty-history '()) 2849 (let* ((empty-history '())
2852 (str (read-from-minibuffer 2850 (str (read-from-minibuffer
2853 prompt nil 2851 prompt nil
@@ -4622,7 +4620,7 @@ This function is called directly from the C code."
4622 byte-compile-current-file 4620 byte-compile-current-file
4623 byte-compile-root-dir))) 4621 byte-compile-root-dir)))
4624 (byte-compile-warn "%s" msg)) 4622 (byte-compile-warn "%s" msg))
4625 (run-with-timer 0 nil 4623 (run-with-idle-timer 0 nil
4626 (lambda (msg) 4624 (lambda (msg)
4627 (minibuffer-message "%s" msg)) 4625 (minibuffer-message "%s" msg))
4628 msg))))) 4626 msg)))))