[Top][All Lists]

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

Re: Is there a plan to record kbd macro as elisp code?

From: Richard Stallman
Subject: Re: Is there a plan to record kbd macro as elisp code?
Date: Sun, 28 Oct 2007 09:50:42 -0400

    That's was exactly my first attempt when I tried to implement this feature.
    However, this approach doesn't work because a macro highly depends on its
    context, and will fail when repeating it in different buffers, modes, etc.

We expect this conversion to use the keymaps that Emacs has when you
do the conversion.  That is a feature, not a bug.

    Also I added a new variable `last-kbd-macro-commands', and a new command
    `insert-last-kbd-macro-commands' to convert the recorded commands with
    their arguments to a Lisp function.

The way you have written this, it looks like it cannot convert an
existing keyboard macro.  The user has to type the definition over
again.  That is a big drawback.

Can you make this work by replaying the macro?  At least then
it would be possible to convert an existing macro.

We want to do more simplification of the generated Lisp code;
for instance, to combine multiple calls to self-insert-command
into something more elegant.

reply via email to

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