Subject: bug#21867: 25.0.50; lossage's log doesn't treat characters read by read-char as separate commands

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 23 Aug 2019 03:41:18 +0200

I've now fixed the kmacro problems, but there's still some
irregularities in the recorded keystrokes and commands.

Presently, if you type

(foo)RET

view-lossage will say:

 (			;; self-insert-command
 f			;; self-insert-command
 o			;; self-insert-command
 o			;; self-insert-command
 )			;; self-insert-command
 <return> <return>	;; newline-and-indent

Which is...  kinda wrong?  Because there's only one RET, but at least
we're told that `newline-and-indent' is the result, so it's not that
bad.

But with the patch set, we get:

(			;; self-insert-command
f			;; self-insert-command
o			;; self-insert-command
o			;; self-insert-command
)			;; self-insert-command
<return>		;; <during command execution>
<return>		;; newline-and-indent

which is even more wrong.

Where is that first <return> coming from?  The raw output from
`(recent-keys t)' is:

 40
 (nil . self-insert-command)
 102
 (nil . self-insert-command)
 111
 (nil . self-insert-command)
 111
 (nil . self-insert-command)
 41
 (nil . self-insert-command)
 return return
 (nil . newline-and-indent)

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