GNU bug report logs -
#36989
26.2; Doc string of `y-or-n-p': say it returns nil if answer is not `y' or `DEL'
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Fri, 9 Aug 2019 16:45:02 UTC
Severity: minor
Tags: fixed
Found in version 24.5
Fixed in version 25.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> > Subject line says it all. The doc says only that it returns `t' if
> > the answer is `y'. It should also say what it returns if the answer
> > is no (not `y' or `DEL').
>
> Did you miss where it says:
> Return t if answer is "y" and nil if it is "n".
> ^^^^^^^^^^^^^^^^
No, I didn't miss it, because it's not in the Emacs release
I reported on (the latest release, AFAIK): Emacs 26.2.
This is the full doc string (`C-h f'):
y-or-n-p is a compiled Lisp function in 'subr.el'.
(y-or-n-p PROMPT)
Ask user a "y or n" question. Return t if answer is "y".
Takes one argument, which 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.
No confirmation of answer is requested; a single character is enough.
Also accepts SPC to mean yes, or DEL to mean no.
This bug report was last modified 5 years and 346 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.