Subject: Re: bug#71429: Inconsistent y-or-n-p prompt behavior in Emacs Lisp

From: Eli Zaretskii <[email-masked]>
Date: Sat, 08 Jun 2024 19:36:32 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: Stephen Berman <[email-masked]>,  [email-masked],
>   [email-masked],  [email-masked]
> Date: Sat, 08 Jun 2024 11:38:53 -0400
> 
> > Thanks.  To me, this means that key-valid-p should bind
> > search-spaces-regexp to nil, because otherwise the value will subvert
> > its contract.  Do you agree?
> 
> I kind of agree, but I wonder why it would be non-nil at this point.
> AFAIK `search-spaces-regexp` is meant for interactive searches, so
> let-binding it around code like `substitute-command-keys`,
> `split-string`, or `key-valid-p` sounds like a bug.

You are saying that our implementation of search-spaces-regexp is
incorrect?  Because search.c uses its value regardless of whether it
was invoked interactively or not.

Or maybe you are saying that a Lisp program that binds
search-spaces-regexp has a bug, because Lisp code is not supposed to
bind that?