From: Chong Yidong Date: Sat, 8 Jan 2011 21:17:58 +0000 (-0500) Subject: Doc fix for y-or-n-p and yes-or-no-p. X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~1322^2~239^2~29 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3d91e302868dfb6bf12e697f81167447ce4a7250;p=emacs.git Doc fix for y-or-n-p and yes-or-no-p. * subr.el (y-or-n-p): Doc fix. * fns.c (Fyes_or_no_p): Doc fix. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 86f9e8fa0b9..2df31ccbe7e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2011-01-08 Chong Yidong + * subr.el (y-or-n-p): Doc fix. + * custom.el (custom-safe-theme-files): New defcustom. (custom-theme-load-confirm): New function. (load-theme): Load theme using `load', confirming with diff --git a/lisp/subr.el b/lisp/subr.el index 0f65fb7fbb0..8294ab17782 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2043,8 +2043,11 @@ floating point support." (defun y-or-n-p (prompt &rest args) "Ask user a \"y or n\" question. Return t if answer is \"y\". -The argument 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. +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. + 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 the bindings in `query-replace-map'; see the documentation of that variable diff --git a/src/ChangeLog b/src/ChangeLog index aad0050f0bd..34154e3bf28 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-01-08 Chong Yidong + + * fns.c (Fyes_or_no_p): Doc fix. + 2011-01-08 Andreas Schwab * fns.c (Fyes_or_no_p): Add usage. diff --git a/src/fns.c b/src/fns.c index ddc193d85e4..e59bf212105 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2462,10 +2462,13 @@ do_yes_or_no_p (Lisp_Object prompt) DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, MANY, 0, doc: /* Ask user a yes-or-no question. Return t if answer is yes. -Takes one argument, which is the string to display to ask the question. -It should end in a space; `yes-or-no-p' adds `(yes or no) ' to it. -The user must confirm the answer with RET, -and can edit it until it has been confirmed. +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 \"(yes or no) \" +to it. + +The user must confirm the answer with RET, and can edit it until it +has been confirmed. Under a windowing system a dialog box will be used if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil.