Subject: bug#23980: 25.0.95; Events put in `unread-command-events' can be wrongly handled

From: Dmitry Gutov <[email-masked]>
Date: Tue, 20 Feb 2018 17:35:15 +0200

On 11/19/17 11:39 AM, Chris Feng wrote:
> The bug was fixed by 1f3f4b1296.

Eli, any change to have this backported to emacs-26?

This reason I'm asking is, this fixed a rather nasty bug resulting from 
the interaction between the newest company-mode (0.9.5) and 
flyspell-mode, both of which use sit-for. This particular combination 
results in a timer being run inside a sit-for, which also calls sit-for, 
which in emacs-26 ends up putting e.g. (t t . 45) into 
unread-command-events.

Here's how to reproduce:

- Visit the attached file.

- M-x eval-buffer.

- Start typing.

- See "<t> is undefined" in the minibuffer for every other keypress.

Originally reported here: 
https://github.com/company-mode/company-mode/issues/760