GNU bug report logs - #25860
25.1; Double macro execution

Previous Next

Package: emacs;

Reported by: Marek Twardochlib <wasserwerk.studio <at> googlemail.com>

Date: Fri, 24 Feb 2017 13:13:01 UTC

Severity: normal

Tags: confirmed

Found in version 25.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 25860 <at> debbugs.gnu.org, Marek Twardochlib <wasserwerk.studio <at> googlemail.com>, tino.calancha <at> gmail.com
Subject: bug#25860: 25.1; Double macro execution
Date: Sat, 25 Feb 2017 14:41:36 +0900
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> On Feb 24 2017, Marek Twardochlib <wasserwerk.studio <at> googlemail.com> wrote:
>
>> Then I define another macro that simply call the previous macro
>> insert-a.
>
> How did you do that?
DUNNO how to solve the problem, but i guess th OP means the following:

(defun insert-a-fn (&optional arg)
  (interactive "p")
  (insert "a\n"))

F3 a RET F4
C-x C-k n insert-a RET

(symbol-function 'insert-a)
=>
(lambda (&optional arg)
  "Keyboard macro."
  (interactive "p")
  (kmacro-exec-ring-item (quote ([97 return] 0 "%d")) arg))

I) ;;; Using `insert-a-fn' we insert "a" _once_:
F3 M-x insert-a-fn RET F4
;; Keyboard Macro Editor.  Press C-c C-c to finish; press C-x k RET to cancel.
;; Original keys: <<insert-a-fn>>

Command: last-kbd-macro
Key: none

Macro:

<<insert-a-fn>>		;; insert-a-fn


II) ;;; Using macro `insert-a' we insert "a" _twice_; so you need to remove
    ;;; <<insert-a>> line by hand:
F3 M-x insert-a RET F4
C-x C-k e RET
;; Keyboard Macro Editor.  Press C-c C-c to finish; press C-x k RET to cancel.
;; Original keys: <<insert-a>> a RET

Command: last-kbd-macro
Key: none

Macro:

<<insert-a>>		;; insert-a
a			;; self-insert-command
RET			;; newline




This bug report was last modified 7 years and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.