[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36989: 26.2; Doc string of `y-or-n-p': say it returns nil if answer
From: |
Drew Adams |
Subject: |
bug#36989: 26.2; Doc string of `y-or-n-p': say it returns nil if answer is not `y' or `DEL' |
Date: |
Fri, 9 Aug 2019 10:20:37 -0700 (PDT) |
> > 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.