Hi, I do not understand. C-x ( will start a kbd macro. C-x ) will end a kbd macro C-x e will run the last macro which (to me) does not seem a lot harder than C-f2.
Further, using your own commands is nice, but will cause some heartache on being forced to use a different machine. Derek. On Tue, 5 Apr 2005, Carl Cerecke wrote: > Carl Cerecke wrote: > > Hi, > > > > I've got the following shortcut keys defined for macros: > > > > (global-set-key [f8] 'start-kbd-macro) > > (global-set-key [f9] 'end-kbd-macro) > > (global-set-key [f10] 'call-last-kbd-macro) > > > > Now I'd like to bind the last kbd macro to (say) the key f2 with a > > single keyboard shortcut. > > > > In other words, after defining a macro, I want to be able to press C-f2, > > and thereafter pressing f2 executes that macro. > > FINE! I'll answer it myself then! > > Stick this in your init.el and repeat for as many fx keys as you want. > > (global-set-key '(shift f2) (lambda () > (interactive) > (assign-last-kbd-macro-to-key 'f2))) > > > Cheers, > Carl. > > > -- Derek Smithies Ph.D. IndraNet Technologies Ltd. Email: [EMAIL PROTECTED] ph +64 3 365 6485 Web: http://www.indranet-technologies.com/
