mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-07 15:06:22 +00:00
Doc fix for y-or-n-p; trailing space is no longer needed
* doc/lispref/minibuf.texi (Yes-or-No Queries): * doc/lispref/os.texi (Suspending Emacs): * doc/lispref/tips.texi (Programming Tips): * doc/misc/gnus-faq.texi (FAQ 5-9): * lisp/subr.el (y-or-n-p): * src/fns.c (Fyes_or_no_p): Doc fix to reflect that a trailing space is no longer needed; one is added or removed automatically.
This commit is contained in:
parent
1bae08dbf0
commit
7f53446a10
@ -2209,7 +2209,7 @@ Here is an example:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
(yes-or-no-p "Do you really want to remove everything? ")
|
||||
(yes-or-no-p "Do you really want to remove everything?")
|
||||
|
||||
;; @r{After evaluation of the preceding expression,}
|
||||
;; @r{the following prompt appears,}
|
||||
|
@ -813,7 +813,7 @@ Here is an example of how you could use these hooks:
|
||||
@smallexample
|
||||
@group
|
||||
(add-hook 'suspend-hook
|
||||
(lambda () (or (y-or-n-p "Really suspend? ")
|
||||
(lambda () (or (y-or-n-p "Really suspend?")
|
||||
(error "Suspend canceled"))))
|
||||
@end group
|
||||
(add-hook 'suspend-resume-hook (lambda () (message "Resumed!")
|
||||
|
@ -398,7 +398,7 @@ with a period.
|
||||
@item
|
||||
A question asked in the minibuffer with @code{yes-or-no-p} or
|
||||
@code{y-or-n-p} should start with a capital letter and end with
|
||||
@samp{? }.
|
||||
@samp{?}.
|
||||
|
||||
@item
|
||||
When you mention a default value in a minibuffer prompt,
|
||||
|
@ -1559,7 +1559,7 @@ if you already use Gnus 5.10, if you still use 5.8.8 or
|
||||
"Request confirmation when replying to news."
|
||||
(interactive)
|
||||
(when (or (not (gnus-news-group-p gnus-newsgroup-name))
|
||||
(y-or-n-p "Really reply by mail to article author? "))
|
||||
(y-or-n-p "Really reply by mail to article author?"))
|
||||
ad-do-it))))
|
||||
@end example
|
||||
@noindent
|
||||
|
5
etc/NEWS
5
etc/NEWS
@ -4084,6 +4084,11 @@ The special events 'dbus-event' and 'file-notify' are now ignored in
|
||||
** 'start-process-shell-command' and 'start-file-process-shell-command'
|
||||
do not support the old calling conventions any longer.
|
||||
|
||||
+++
|
||||
** 'yes-or-no-p' and 'y-or-n-p' PROMPT parameter no longer needs trailing space.
|
||||
This has been the case since Emacs 24.4 but was not announced or
|
||||
documented until now.
|
||||
|
||||
+++
|
||||
** The 'uniquify' argument in 'auto-save-file-name-transforms' can be a symbol.
|
||||
If this symbol is one of the members of 'secure-hash-algorithms',
|
||||
|
@ -3204,8 +3204,10 @@ character. This is not possible when using `read-key', but using
|
||||
(defun y-or-n-p (prompt)
|
||||
"Ask user a \"y or n\" question.
|
||||
Return t if answer is \"y\" and nil if it is \"n\".
|
||||
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.
|
||||
|
||||
PROMPT is the string to display to ask the question; `y-or-n-p'
|
||||
adds \" (y or n) \" to it. It does not need to end in space, but
|
||||
if it does up to one space will be removed.
|
||||
|
||||
If you bind the variable `help-form' to a non-nil value
|
||||
while calling this function, then pressing `help-char'
|
||||
|
@ -2950,8 +2950,10 @@ do_yes_or_no_p (Lisp_Object prompt)
|
||||
DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, 1, 0,
|
||||
doc: /* Ask user a yes-or-no question.
|
||||
Return t if answer is yes, and nil if the answer is no.
|
||||
PROMPT 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.
|
||||
|
||||
PROMPT is the string to display to ask the question; `yes-or-no-p'
|
||||
adds \"(yes or no) \" to it. It does not need to end in space, but if
|
||||
it does up to one space will be removed.
|
||||
|
||||
The user must confirm the answer with RET, and can edit it until it
|
||||
has been confirmed.
|
||||
|
Loading…
Reference in New Issue
Block a user