Subject: bug#15012: 23.3; read-char inappropriate echo area content

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 15 Aug 2019 09:01:26 -0700

Eli Zaretskii <[email-masked]> writes:

> I can reproduce it very easily, both in Emacs 26 and 27.  I wonder how
> come you couldn't.

Me too.  If I do M-: (read-char) in this Emacs, the echo area remains
empty.  If I start a new Emacs and do the same, the echo area says
"M-:-", so... something I have eval-ed in this session has changed the
behaviour?  `read-char' still points to the built-in function...

> I don't think it's a bug, though: that's how character echoing works
> in Emacs.  It is even kinda-documented in the ELisp manual, under
> read-event.
>
> I've reopened the bug, but if people agree this is established and
> documented (albeit perhaps surprising) behavior, I think it should be
> closed as wontfix.

I think this behaviour should be noted in the doc string, at least.  The
only thing it says about PROMPT is

--
If the optional argument PROMPT is non-nil, display that as a prompt.
--

and noting the nil/"" behaviour should be simple enough.  (I guess the
changes should be to the doc strings of
read-event/read-char/read-char-exclusive.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no