@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,}
@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!")
@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,
"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
** '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',
(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'
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.