all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#36989: 26.2; Doc string of `y-or-n-p': say it returns nil if answer is not `y' or `DEL'
@ 2019-08-09 16:44 Drew Adams
  2019-08-09 17:02 ` Noam Postavsky
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2019-08-09 16:44 UTC (permalink / raw)
  To: 36989

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').

(The Elisp manual is OK for this.)

In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
 of 2019-04-13
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor `Microsoft Corp.', version 10.0.17763
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#36989: 26.2; Doc string of `y-or-n-p': say it returns nil if answer is not `y' or `DEL'
  2019-08-09 16:44 bug#36989: 26.2; Doc string of `y-or-n-p': say it returns nil if answer is not `y' or `DEL' Drew Adams
@ 2019-08-09 17:02 ` Noam Postavsky
  2019-08-09 17:20   ` Drew Adams
  0 siblings, 1 reply; 5+ messages in thread
From: Noam Postavsky @ 2019-08-09 17:02 UTC (permalink / raw)
  To: Drew Adams; +Cc: 36989

Drew Adams <drew.adams@oracle.com> writes:

> 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".
                                  ^^^^^^^^^^^^^^^^





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#36989: 26.2; Doc string of `y-or-n-p': say it returns nil if answer is not `y' or `DEL'
  2019-08-09 17:02 ` Noam Postavsky
@ 2019-08-09 17:20   ` Drew Adams
  2019-08-09 17:26     ` Noam Postavsky
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2019-08-09 17:20 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 36989

> > 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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#36989: 26.2; Doc string of `y-or-n-p': say it returns nil if answer is not `y' or `DEL'
  2019-08-09 17:20   ` Drew Adams
@ 2019-08-09 17:26     ` Noam Postavsky
  2019-08-09 17:32       ` Drew Adams
  0 siblings, 1 reply; 5+ messages in thread
From: Noam Postavsky @ 2019-08-09 17:26 UTC (permalink / raw)
  To: Drew Adams; +Cc: 36989

notfound 36989 26.2
found 36989 24.5
tags 36989 fixed
close 36989 25.1
quit

Drew Adams <drew.adams@oracle.com> writes:

>> 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.

I don't think you are looking at the docstring from Emacs 26.2.

https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/subr.el?h=emacs-26.2#n2507

> Ask user a "y or n" question.  Return t if answer is "y".

That seems to be the docstring from 24.5.

https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/subr.el?h=emacs-24.5#n2212





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#36989: 26.2; Doc string of `y-or-n-p': say it returns nil if answer is not `y' or `DEL'
  2019-08-09 17:26     ` Noam Postavsky
@ 2019-08-09 17:32       ` Drew Adams
  0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2019-08-09 17:32 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 36989

> I don't think you are looking at the docstring from Emacs 26.2.
> 
> > Ask user a "y or n" question.  Return t if answer is "y".
> 
> That seems to be the docstring from 24.5.

Very sorry.  My bad.  I am in 26.2, but that doc
string is from a redefinition I had of the function.

I'll close the bug, if you haven't already.
Sorry for wasting your time.  And thanks for
identifying the problem so quickly.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-08-09 17:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-09 16:44 bug#36989: 26.2; Doc string of `y-or-n-p': say it returns nil if answer is not `y' or `DEL' Drew Adams
2019-08-09 17:02 ` Noam Postavsky
2019-08-09 17:20   ` Drew Adams
2019-08-09 17:26     ` Noam Postavsky
2019-08-09 17:32       ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.