How can I bind a kbd macro to a key for future sessions in common lisp?

113 views Asked by At

This is probably a newbie question.

I'm trying to bind a keyboard macro to a key and have it available each time I load a file. I'm using lispbox.

This is the code I'm trying (the macro used here is just a placeholder):

(fset 'macro1
      (lambda (&optional arg) 
    "Keyboard macro." 
    (interactive "p") 
    (kmacro-exec-ring-item (quote ("uuu" 0 "%d")) arg)))
(global-set-key "[f5]" 'macro1)

But when evaluating, fset and global-set-key are undefined. I think I managed to avoid using fset by doing:

(setf (symbol-function 'macro1)...

But I canĀ“t work my way around global-set-key. Calling the variable global-map shows the same message. I'm guessing, after searching a lot, that this isn't meant to work en CL but in Elisp. How should I proceed?

0

There are 0 answers