aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2011-01-19 21:55:36 -0500
committerChong Yidong2011-01-19 21:55:36 -0500
commit9aea757bb0003d0e7679cf96a726c0d58e7c4093 (patch)
treea73c5675f42c161664a2ede764b7dca5eac03d5f /src
parent38ec24bf555387224ba36a7ead82d6e4d89018ed (diff)
downloademacs-9aea757bb0003d0e7679cf96a726c0d58e7c4093.tar.gz
emacs-9aea757bb0003d0e7679cf96a726c0d58e7c4093.zip
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 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/fns.c22
2 files changed, 16 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 735b6e4789e..7227d2e9940 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12011-01-20 Chong Yidong <cyd@stupidchicken.com>
2
3 * fns.c (Fyes_or_no_p): Revert 2011-01-07 change, removing ARGS.
4
12011-01-19 Paul Eggert <eggert@cs.ucla.edu> 52011-01-19 Paul Eggert <eggert@cs.ucla.edu>
2 6
3 Fix X11 compilation failure. 7 Fix X11 compilation failure.
diff --git a/src/fns.c b/src/fns.c
index 236e498bea5..52570a8af9f 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2450,24 +2450,23 @@ do_yes_or_no_p (Lisp_Object prompt)
2450 2450
2451/* Anything that calls this function must protect from GC! */ 2451/* Anything that calls this function must protect from GC! */
2452 2452
2453DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, MANY, 0, 2453DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, 1, 0,
2454 doc: /* Ask user a yes-or-no question. Return t if answer is yes. 2454 doc: /* Ask user a yes-or-no question. Return t if answer is yes.
2455The string to display to ask the question is obtained by 2455PROMPT is the string to display to ask the question. It should end in
2456formatting the string PROMPT with arguments ARGS (see `format'). 2456a space; `yes-or-no-p' adds \"(yes or no) \" to it.
2457The result should end in a space; `yes-or-no-p' adds
2458\"(yes or no) \" to it.
2459 2457
2460The user must confirm the answer with RET, and can edit it until it 2458The user must confirm the answer with RET, and can edit it until it
2461has been confirmed. 2459has been confirmed.
2462 2460
2463Under a windowing system a dialog box will be used if `last-nonmenu-event' 2461Under a windowing system a dialog box will be used if `last-nonmenu-event'
2464is nil, and `use-dialog-box' is non-nil. 2462is nil, and `use-dialog-box' is non-nil. */)
2465usage: (yes-or-no-p PROMPT &rest ARGS) */) 2463 (Lisp_Object prompt)
2466 (int nargs, Lisp_Object *args)
2467{ 2464{
2468 register Lisp_Object ans; 2465 register Lisp_Object ans;
2466 Lisp_Object args[2];
2469 struct gcpro gcpro1; 2467 struct gcpro gcpro1;
2470 Lisp_Object prompt = Fformat (nargs, args); 2468
2469 CHECK_STRING (prompt);
2471 2470
2472#ifdef HAVE_MENUS 2471#ifdef HAVE_MENUS
2473 if (FRAME_WINDOW_P (SELECTED_FRAME ()) 2472 if (FRAME_WINDOW_P (SELECTED_FRAME ())
@@ -2488,7 +2487,10 @@ usage: (yes-or-no-p PROMPT &rest ARGS) */)
2488 } 2487 }
2489#endif /* HAVE_MENUS */ 2488#endif /* HAVE_MENUS */
2490 2489
2491 prompt = concat2 (prompt, build_string ("(yes or no) ")); 2490 args[0] = prompt;
2491 args[1] = build_string ("(yes or no) ");
2492 prompt = Fconcat (2, args);
2493
2492 GCPRO1 (prompt); 2494 GCPRO1 (prompt);
2493 2495
2494 while (1) 2496 while (1)