Subject: Re: bug#22107: 25.1; Wrong docstring for this-single-command-keys

From: Stefan Monnier <[email-masked]>
Date: Fri, 11 Dec 2015 09:47:38 -0500

>> >> > So how about saying a few words about the meaning of the return value
>> >> > of internal-echo-keystrokes-prefix?  I think it's important enough to
>> >> > have that at least documented in comments.
>> >> It's used as a proxy for "we're in the middle of a command-with-prefix,
>> > When it returns non-nil, I presume?
>> Right.
> Hmm... I see it also has some side effects, so is it really safe to
> call it whenever we want to know "if we are in the middle of
> command-with-prefix"?  What could those side effects be?

As currently implemented, it should be "pure with memoization" (IOW the
"effect" is in the memoization only).  And that's the intention of how
it should behave.  Of course it's Elisp so it could do anything.
IOW it's OK to call it iff calling Elisp doesn't risk crashing Emacs.

        Stefan