all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christoph Arenz <tiga.arenz@web.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Severe regressions in context of keyboard macros
Date: Sat, 28 Sep 2019 11:18:51 +0200	[thread overview]
Message-ID: <490eaf69-c3fe-6ea3-8f89-c0d4d56c5b88@web.de> (raw)
In-Reply-To: <830f19fe-20dd-b3a3-fc50-26573760dbff@web.de>

On 26.09.19 20:27, Christoph Arenz wrote:
>
> Now, I started to get a closer look at the other facility you mentioned:
> '(no-record . KEY):
> Here is my current result. I did not have much time for tests, though.
> Does this go in the right direction?
I spent some more time on this. The problem is bigger than stated in the
original bug report:
Any function key that follows a digit and is not separated by a <spc> or
<return> is recorded twice in calc when defining a keyboard macro, e.g.
`1 <return> <f3> 2 + <f4>' records "2++".

I am getting more confident that the patch below fixes this bug.Itfixes
a severe issue with macros in calc, does not make things worse and does
not interfere in case no macro is being defined.

Your thoughts?

Thanks,
Christoph

Author:     Christoph Arenz <tiga.arenz@web.de>
AuthorDate: Fri Sep 27 20:47:18 2019 +0200

Calc: prevent double-recording of keys in keyboard macros.

1 file changed, 5 insertions(+), 1 deletion(-)
lisp/calc/calc.el | 6 +++++-

modified   lisp/calc/calc.el
@@ -3400,7 +3400,11 @@ calc-read-key
      (cons key key)))

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

  (defun calc-clear-unread-commands ()
    (setq unread-command-events nil))





  reply	other threads:[~2019-09-28  9:18 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 [this message]
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
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=490eaf69-c3fe-6ea3-8f89-c0d4d56c5b88@web.de \
    --to=tiga.arenz@web.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.