- Subject: Re: save/load macros?
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Sat, 11 Aug 2007 14:05:55 -0400
Ulli Horlacher <framstag@xxxxxxxxxxxxxxxxxxxx> wrote:
>I want them to be persistent - between several jed instances.
In that case, I encourage you to consider using a slang function
instead of a macro. The macro_to_function function in macro.sl may be
used to simplify the task of converting the macro to a function. The
problem with keyboard macros is that they are tied to the functions of
a particular keymap and should only be used in such a context. If you
tweak your keybindings, then your macro might be (negatively)
affected. In any case, if you want to reuse a macro in a future jed
session, you really should enable it in the appropriate mode hook.
With that said, consider the file created by the macro_save_macro
function. Suppose its contents looks like:
%%%MACRO NAME: foo
@^B^K^B^E^Kk^[[Aascascsac^M
where the "foo" macro was created for use in c-mode. Then you can
manually add this to a c_mode_hook using:
define c_mode_hook ()
{
.
.
local_setkey ("@^B^K^B^E^Kk^[[Aascascsac^M", "PUT-KEY-BINDING-HERE");
.
.
}
I hope this helps.
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2007 date index]
[2007 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]