help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Calling macro by name while defining another macro


From: Robert Pluim
Subject: Re: Calling macro by name while defining another macro
Date: Thu, 22 Mar 2018 16:12:42 +0100

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> 1. define macro using `C-x ('
>> 2. finish the macro `C-x )'
>> 3. name the macro `some-macro' using `name-last-kbd-macro'
>> 4. define another macro using `C-x ('
>> 5. call `some-macro' using `M-x some-macro' (some-macro called once)
>> 6. finish macro editing using `C-x )'
>> 7. call the macro again using `C-x e' (effects of `some-macro' are
>> applied twice)
>
> Sounds like a bug.

How so? The macro is faithfully recording all the keystrokes, which is
both literally 'M-x some-macro' and the keystrokes output by running
that macro.

As a workaround, you could edit the second macro after defining it to
remove the bits you don't want, but that does go against the
ease-of-use intent of macros.

Robert



reply via email to

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