emacs-devel
[Top][All Lists]
Advanced

[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: Juri Linkov
Subject: Re: Is there a plan to record kbd macro as elisp code?
Date: Sun, 28 Oct 2007 17:09:07 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

>     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.

It preserves Lisp code of the last defined macro.  I think this is enough
for this feature to be useful.  If not, we could keep the converted Lisp
code with every macro definition.

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

This is easy to implement, but replaying the macro is not always possible.

> 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.

I agree.  A function `kmacro-convert-macro-commands' in my patch is
intended for such simplifications.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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