aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2019-10-15 15:09:55 +0300
committerEli Zaretskii2019-10-15 15:09:55 +0300
commitc76b968374e59b0d2c6f652b4f37555374f1ae7d (patch)
tree7806cce27a847207ff76787d820cbc8aae340382
parentfcb89237d9ab969bcd29bf8f8fae8d9905644b92 (diff)
downloademacs-c76b968374e59b0d2c6f652b4f37555374f1ae7d.tar.gz
emacs-c76b968374e59b0d2c6f652b4f37555374f1ae7d.zip
Fix recording keyboard macros in Calc
* lisp/calc/calc.el (calc-unread-command): Prevent recording key twice when defining a keyboard macro. Patch by Christoph Arenz <tiga.arenz@web.de>. Copyright-paperwork-exempt: yes
-rw-r--r--lisp/calc/calc.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index ad483b406d5..3996c377b19 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -3400,7 +3400,12 @@ See Info node `(calc)Defining Functions'."
3400 (cons key key))) 3400 (cons key key)))
3401 3401
3402(defun calc-unread-command (&optional input) 3402(defun calc-unread-command (&optional input)
3403 (push (or input last-command-event) unread-command-events)) 3403 (let ((event (or input last-command-event)))
3404 ;; Avoid recording twice the keys pressed while defining a
3405 ;; keyboard macro.
3406 (when defining-kbd-macro
3407 (setq event (cons 'no-record event)))
3408 (push event unread-command-events)))
3404 3409
3405(defun calc-clear-unread-commands () 3410(defun calc-clear-unread-commands ()
3406 (setq unread-command-events nil)) 3411 (setq unread-command-events nil))