diff options
| author | Chong Yidong <cyd@stupidchicken.com> | 2011-01-19 21:55:36 -0500 |
|---|---|---|
| committer | Chong Yidong <cyd@stupidchicken.com> | 2011-01-19 21:55:36 -0500 |
| commit | 9aea757bb0003d0e7679cf96a726c0d58e7c4093 (patch) | |
| tree | a73c5675f42c161664a2ede764b7dca5eac03d5f /lisp/subr.el | |
| parent | 38ec24bf555387224ba36a7ead82d6e4d89018ed (diff) | |
| download | emacs-9aea757bb0003d0e7679cf96a726c0d58e7c4093.tar.gz | |
Revert changes adding format args to yes-or-no-p and y-or-n-p.
See discussion on emacs-devel at
http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00388.html
* src/fns.c (Fyes_or_no_p): Revert 2011-01-07 change, removing ARGS.
* lisp/subr.el (y-or-n-p): Revert 2011-01-07 change, removing ARGS.
* lisp/files.el (find-alternate-file, basic-save-buffer)
(basic-save-buffer-2, revert-buffer, recover-file)
(kill-buffer-ask, abort-if-file-too-large)
(set-visited-file-name, write-file, backup-buffer)
(basic-save-buffer, save-some-buffers):
* lisp/dired-aux.el (dired-compress-file): Callers changed.
Diffstat (limited to 'lisp/subr.el')
| -rw-r--r-- | lisp/subr.el | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 25f36269df0..d36e96e5f89 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2067,12 +2067,10 @@ floating point support." nil)))))) (set-advertised-calling-convention 'sit-for '(seconds &optional nodisp) "22.1") -(defun y-or-n-p (prompt &rest args) +(defun y-or-n-p (prompt) "Ask user a \"y or n\" question. Return t if answer is \"y\". -The string to display to ask the question is obtained by -formatting the string PROMPT with arguments ARGS (see `format'). -The result should end in a space; `y-or-n-p' adds \"(y or n) \" -to it. +PROMPT is the string to display to ask the question. It should +end in a space; `y-or-n-p' adds \"(y or n) \" to it. No confirmation of the answer is requested; a single character is enough. Also accepts Space to mean yes, or Delete to mean no. \(Actually, it uses @@ -2091,7 +2089,7 @@ is nil and `use-dialog-box' is non-nil." use-dialog-box) (setq answer (x-popup-dialog t `(,prompt ("yes" . act) ("No" . skip)))) - (setq prompt (concat (apply 'format prompt args) + (setq prompt (concat prompt (if (eq ?\s (aref prompt (1- (length prompt)))) "" " ") "(y or n) ")) |
