Subject: Re: bug#21329: 25.0.50; Flyspell minor mode produces weird effects on keyboard macros

From: Stefan Monnier <[email-masked]>
Date: Tue, 25 Aug 2015 09:15:58 -0400

> The problem is that 'sit-for' calls 'read-event', and then "undoes"
> that by pushing the events it read onto unread-command-events.

Indeed, that's a problem.  The right fix would be to change the code so
as not to consume any event in the first place.

> Or maybe we should introduce an "unrecord-key" facility for use by
> code such as we have in sit-for?

We could try, but I don't believe we can provide an "unrecord-key"
that's actually reliable.  AFAIK the act of taking an event out of the
queue has too many effects to have a hope of properly reverting
them all.

        Stefan