all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Christoph Arenz <tiga.arenz@web.de>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Severe regressions in context of keyboard macros
Date: Sat, 28 Sep 2019 08:35:29 -0400	[thread overview]
Message-ID: <jwvwods4n70.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <490eaf69-c3fe-6ea3-8f89-c0d4d56c5b88@web.de> (Christoph Arenz's message of "Sat, 28 Sep 2019 11:18:51 +0200")

>  (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




  parent reply	other threads:[~2019-09-28 12:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19  8:17 Severe regressions in context of keyboard macros Christoph Arenz
2019-09-20  7:23 ` Eli Zaretskii
2019-09-20 15:43   ` Christoph Arenz
2019-09-20 17:54     ` Eli Zaretskii
2019-09-23 11:57       ` Christoph Arenz
2019-09-24  8:45         ` Eli Zaretskii
2019-09-26 10:46           ` Christoph Arenz
2019-09-26 10:56             ` Eli Zaretskii
2019-09-26 11:22               ` Christoph Arenz
2019-09-26 12:10                 ` Eli Zaretskii
2019-09-26 18:27                   ` Christoph Arenz
2019-09-28  9:18                     ` Christoph Arenz
2019-09-28  9:46                       ` Eli Zaretskii
2019-09-29 17:42                         ` Christoph Arenz
2019-10-15 12:12                           ` Eli Zaretskii
2019-09-28 12:35                       ` Stefan Monnier [this message]
2019-09-28 13:44                         ` Eli Zaretskii
2019-09-29 17:59                           ` Christoph Arenz
2019-09-27 14:58             ` Fwd: " Christoph Arenz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvwods4n70.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=tiga.arenz@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.