jed-users mailing list

[2007 Date Index] [2007 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: save/load macros?


Ulli Horlacher <framstag@xxxxxxxxxxxxxxxxxxxx> wrote:
>My solution is now:
>
>    define F11() {
>      variable km,k,i;
>      variable m = line_as_string;
>      % call("delete_window");
>      k = what_keymap();
>      km = get_keymaps();
>      for (i=0;i<length(km);i++) {
>        use_keymap(km[i]);
>        local_setkey(m,"\e[23~");
>      }
>      use_keymap(k);
>    }

You might try this in your .jedrc:

   % define functions that will run macros
   define F11 () { }
   define F12 () { }
   
   define keybindings_kook (emulation)
   {
      setkey ("F11", "F11-Key-Sequence");
      setkey ("F12", "F12-Key-Sequence");
   }
   
   % Now load the emulation
   require ("edt");
   
This will have the desired effect of binding F11 and F12 in all
keymaps.  If you want to change what, e.g., F11 does at some point,
simply redefine it:

   define F11 () 
   {
      call ("@^A>^E<^[OC");
   }

This will cause F11 to execute the macro of your previous post.

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