aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/fns.c13
2 files changed, 8 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 12768f3578b..7fb63964b6e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12011-01-07 Chong Yidong <cyd@stupidchicken.com>
2
3 * fns.c (Fyes_or_no_p): Accept format string args.
4
12011-01-07 Glenn Morris <rgm@gnu.org> 52011-01-07 Glenn Morris <rgm@gnu.org>
2 6
3 * emacs.c (no_site_lisp): New int. 7 * emacs.c (no_site_lisp): New int.
diff --git a/src/fns.c b/src/fns.c
index 8d54b73586f..3282b300f49 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2460,7 +2460,7 @@ do_yes_or_no_p (Lisp_Object prompt)
2460 2460
2461/* Anything that calls this function must protect from GC! */ 2461/* Anything that calls this function must protect from GC! */
2462 2462
2463DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, 1, 0, 2463DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, MANY, 0,
2464 doc: /* Ask user a yes-or-no question. Return t if answer is yes. 2464 doc: /* Ask user a yes-or-no question. Return t if answer is yes.
2465Takes one argument, which is the string to display to ask the question. 2465Takes one argument, which is the string to display to ask the question.
2466It should end in a space; `yes-or-no-p' adds `(yes or no) ' to it. 2466It should end in a space; `yes-or-no-p' adds `(yes or no) ' to it.
@@ -2469,13 +2469,11 @@ and can edit it until it has been confirmed.
2469 2469
2470Under a windowing system a dialog box will be used if `last-nonmenu-event' 2470Under a windowing system a dialog box will be used if `last-nonmenu-event'
2471is nil, and `use-dialog-box' is non-nil. */) 2471is nil, and `use-dialog-box' is non-nil. */)
2472 (Lisp_Object prompt) 2472 (int nargs, Lisp_Object *args)
2473{ 2473{
2474 register Lisp_Object ans; 2474 register Lisp_Object ans;
2475 Lisp_Object args[2];
2476 struct gcpro gcpro1; 2475 struct gcpro gcpro1;
2477 2476 Lisp_Object prompt = Fformat (nargs, args);
2478 CHECK_STRING (prompt);
2479 2477
2480#ifdef HAVE_MENUS 2478#ifdef HAVE_MENUS
2481 if (FRAME_WINDOW_P (SELECTED_FRAME ()) 2479 if (FRAME_WINDOW_P (SELECTED_FRAME ())
@@ -2496,10 +2494,7 @@ is nil, and `use-dialog-box' is non-nil. */)
2496 } 2494 }
2497#endif /* HAVE_MENUS */ 2495#endif /* HAVE_MENUS */
2498 2496
2499 args[0] = prompt; 2497 prompt = concat2 (prompt, build_string ("(yes or no) "));
2500 args[1] = build_string ("(yes or no) ");
2501 prompt = Fconcat (2, args);
2502
2503 GCPRO1 (prompt); 2498 GCPRO1 (prompt);
2504 2499
2505 while (1) 2500 while (1)