Re: Emacs initialisation query
Lo, on Thursday, March 22, Oliver Elphick did write:
> (If it matters, I'm using xemacs 21).
>
> I want to define a function key to run a macro.
>
> I can do it within a session:
>
> ESC x global-set-key RET <f9> eif-indent-buffer RET
>
> but I can't get it to work in the initialisation file ~/.emacs:
>
> (defalias 'eif-indent-buffer (read-kbd-macro
> "ESC x mark- whole- buffer RET ESC x eif- indent- region RET"))
> (global-set-key <f9> 'eif-indent-buffer)
>
>
> What should I put for <f9>? I've tried "f9", <f9>, "<f9>", (<f9>) and it
> doesn't like any of them. I can't see anything about it in the docs either.
(global-set-key [f9] 'eif-indent-buffer)
See the xemacs info page, `Key Sequences' node.
Richard
Reply to: