Hi,
I have the following Emacs Lisp code:

(progn
  (y-or-n-p "Test: ")
  (let ((search-spaces-regexp "\\(?:\\n?[\s\t]+\\|\n\\)?"))
    (y-or-n-p "Test: ")))

The first prompt from the y-or-n-p function appears as expected:

Test: (y or n)

However, the second prompt appears differently:

Test: (‘y’ or ‘n’)

I’m trying to understand why the second prompt format changes. What causes this inconsistency in the y-or-n-p prompt?

I suspect it might be related to the search-spaces-regexp variable or how Emacs handles interactive prompts, but I’m not sure. Any insights or explanations would be greatly appreciated!

Best regards,

Gabriele Nicolardi