Subject: Re: bug#33749: 26.1; input-decode-map to empty vector should preserve echo area

From: Stefan Monnier <[email-masked]>
Date: Wed, 19 Dec 2018 13:05:42 -0500

> The call sequence that causes the echo to be cleared looks like this:
>
> command_loop_1 (in keyboard.c)
>   read_key_sequence
>     read_char
>       redisplay
>
> and much of the read_char and read_key_sequence mechanics maintain
> echoing of the current prefix sequence.

Have you been able to track down the precise call to (one of the C entry
point of) `message` which causes the echo area to be cleared in
your case?

> * src/keyboard.c (read_key_sequence): If the current sequence is
>   mapped via `input-decode-map' to an empty sequence and
>   `input-decode-preserve-echo' is non-nil, return -1.

input-decode-map doesn't only apply to the beginning of a key-sequence,
but also in the middle (e.g. in your case, when you do `C-x h` the
input-decode-map likely applies to the "release control modifier" event
that occurs between `C-x` and `h`).

Returning -1 after `C-x` and before we got to read `h` wouldn't
be right.

Also, who/where do you intend to set input-decode-preserve-echo?

        Stefan