diff options
author | Glenn Morris <rgm@gnu.org> | 2018-11-28 07:51:12 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2018-11-28 07:51:12 -0800 |
commit | 415ef4a2b02dac17bf1bb962154633e671e561dd (patch) | |
tree | 029c1022ff672e6e4e4a2d44a8661a6543b130e5 /lisp/emacs-lisp/map-ynp.el | |
parent | 2c59cfa831f133ca75b513e05aaedeccfe410784 (diff) | |
parent | 74a3a795afbf092d4086e5ebb4dcf0254e7c8b46 (diff) | |
download | emacs-415ef4a2b02dac17bf1bb962154633e671e561dd.tar.gz |
Merge from origin/emacs-26
74a3a79 (origin/emacs-26) Fix a typo in a doc string
911766d Minor markup fix in frames.texi
19ed1e9 * lisp/net/trampver.el (customize-package-emacs-version-alist...
d7132ad * lisp/mh-e/mh-e.el (customize-package-emacs-version-alist): ...
5f39260 * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Pass format to m...
a291f62 Don't call xwidget functions until GTK has been initialized
f0531b8 Improve documentation of Ediff wordwise commands
2925ce5 Support Hunspell 1.7.0 in ispell.el
03bb7a8 Avoid clearing echo-area message by auto-save-visited-file-name
Diffstat (limited to 'lisp/emacs-lisp/map-ynp.el')
-rw-r--r-- | lisp/emacs-lisp/map-ynp.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index a61c0adc8fb..27e8ea6adee 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -79,6 +79,7 @@ are meaningful here. Returns the number of actions taken." (let* ((actions 0) + (msg (current-message)) user-keys mouse-event map prompt char elt def ;; Non-nil means we should use mouse menus to ask. use-menus @@ -246,9 +247,12 @@ C-g to quit (cancel the whole command); (if delayed-switch-frame (setq unread-command-events (cons delayed-switch-frame unread-command-events)))) - ;; Clear the last prompt from the minibuffer. + ;; Clear the last prompt from the minibuffer, and restore the + ;; previous echo-area message, if any. (let ((message-log-max nil)) - (message "")) + (if msg + (message "%s" msg) + (message ""))) ;; Return the number of actions that were taken. actions)) @@ -261,7 +265,7 @@ C-g to quit (cancel the whole command); "If non-nil, `read-answer' accepts single-character answers. If t, accept short (single key-press) answers to the question. If nil, require long answers. If `auto', accept short answers if -the function cell of `yes-or-no-p' is set to `y-or-on-p'." +the function cell of `yes-or-no-p' is set to `y-or-n-p'." :type '(choice (const :tag "Accept short answers" t) (const :tag "Require long answer" nil) (const :tag "Guess preference" auto)) |