aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2018-11-26 19:27:45 +0200
committerEli Zaretskii2018-11-26 19:27:45 +0200
commit03bb7a8da9d16dd3dbd5a3ce56adb449e808bf2a (patch)
tree843a3ef74a6a71c6b282675cd919012da1bd95b6
parentea624626ccc2a108c3d6420d4f7ed3edae185425 (diff)
downloademacs-03bb7a8da9d16dd3dbd5a3ce56adb449e808bf2a.tar.gz
emacs-03bb7a8da9d16dd3dbd5a3ce56adb449e808bf2a.zip
Avoid clearing echo-area message by auto-save-visited-file-name
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Record the previous echo-area message, if any, and restore it before exiting. (Bug#33490)
-rw-r--r--lisp/emacs-lisp/map-ynp.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el
index 8260af57278..93235bd9ece 100644
--- a/lisp/emacs-lisp/map-ynp.el
+++ b/lisp/emacs-lisp/map-ynp.el
@@ -79,6 +79,7 @@ are meaningful here.
79 79
80Returns the number of actions taken." 80Returns the number of actions taken."
81 (let* ((actions 0) 81 (let* ((actions 0)
82 (msg (current-message))
82 user-keys mouse-event map prompt char elt def 83 user-keys mouse-event map prompt char elt def
83 ;; Non-nil means we should use mouse menus to ask. 84 ;; Non-nil means we should use mouse menus to ask.
84 use-menus 85 use-menus
@@ -250,9 +251,10 @@ the current %s and exit."
250 (if delayed-switch-frame 251 (if delayed-switch-frame
251 (setq unread-command-events 252 (setq unread-command-events
252 (cons delayed-switch-frame unread-command-events)))) 253 (cons delayed-switch-frame unread-command-events))))
253 ;; Clear the last prompt from the minibuffer. 254 ;; Clear the last prompt from the minibuffer, and restore the
255 ;; previous echo-area message, if any.
254 (let ((message-log-max nil)) 256 (let ((message-log-max nil))
255 (message "")) 257 (message (or msg "")))
256 ;; Return the number of actions that were taken. 258 ;; Return the number of actions that were taken.
257 actions)) 259 actions))
258 260