emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Severe regressions in context of keyboard macros


From: Stefan Monnier
Subject: Re: Severe regressions in context of keyboard macros
Date: Sat, 28 Sep 2019 08:35:29 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>  (defun calc-unread-command (&optional input)
> -  (push (or input last-command-event) unread-command-events))
> +  (let ((event (or input last-command-event)))
> +    ;; do not double-record key presses when defining a keyboard macro
> +    (when defining-kbd-macro
> +      (setq event (cons 'no-record event)))
> +    (push event unread-command-events)))

Over the years, I have convinced myself that there is pretty much no way
to put events back on unread-command-events for reprocessing without
introducing corner case bugs.

For this reason I introduced the `set-transient-map` function, which can
be used in some cases to avoid "read + unread".

Anyway, my point is that maybe a better fix is to try and understand why
Calc does a read+unread and then figure out a way to get the same end
result without needing to read+unread.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]