diff options
| author | Chong Yidong | 2011-01-19 21:55:36 -0500 |
|---|---|---|
| committer | Chong Yidong | 2011-01-19 21:55:36 -0500 |
| commit | 9aea757bb0003d0e7679cf96a726c0d58e7c4093 (patch) | |
| tree | a73c5675f42c161664a2ede764b7dca5eac03d5f /src | |
| parent | 38ec24bf555387224ba36a7ead82d6e4d89018ed (diff) | |
| download | emacs-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/ChangeLog | 4 | ||||
| -rw-r--r-- | src/fns.c | 22 |
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 @@ | |||
| 1 | 2011-01-20 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * fns.c (Fyes_or_no_p): Revert 2011-01-07 change, removing ARGS. | ||
| 4 | |||
| 1 | 2011-01-19 Paul Eggert <eggert@cs.ucla.edu> | 5 | 2011-01-19 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 6 | ||
| 3 | Fix X11 compilation failure. | 7 | Fix X11 compilation failure. |
| @@ -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 | ||
| 2453 | DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, MANY, 0, | 2453 | DEFUN ("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. |
| 2455 | The string to display to ask the question is obtained by | 2455 | PROMPT is the string to display to ask the question. It should end in |
| 2456 | formatting the string PROMPT with arguments ARGS (see `format'). | 2456 | a space; `yes-or-no-p' adds \"(yes or no) \" to it. |
| 2457 | The result should end in a space; `yes-or-no-p' adds | ||
| 2458 | \"(yes or no) \" to it. | ||
| 2459 | 2457 | ||
| 2460 | The user must confirm the answer with RET, and can edit it until it | 2458 | The user must confirm the answer with RET, and can edit it until it |
| 2461 | has been confirmed. | 2459 | has been confirmed. |
| 2462 | 2460 | ||
| 2463 | Under a windowing system a dialog box will be used if `last-nonmenu-event' | 2461 | Under a windowing system a dialog box will be used if `last-nonmenu-event' |
| 2464 | is nil, and `use-dialog-box' is non-nil. | 2462 | is nil, and `use-dialog-box' is non-nil. */) |
| 2465 | usage: (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) |