[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How make C-m turn macro recording phase on AND off??? (a TOGGLE SWIT
Michael P. Soulier
Re: How make C-m turn macro recording phase on AND off??? (a TOGGLE SWITCH!!!)
Tue, 11 Dec 2001 22:28:23 -0500
On Tue, Dec 11, 2001 at 02:45:34PM -0800, Chris Seberino wrote:
> >From previous email but more specific question posted...
> How make C-m turn off AND on macro recording!!!???!!!
> A recording on/off TOGGLE switch would be easier and better
> than a command for each.
> Thanks in advance,
Hmm. Neat idea.
How about this?
(defvar kbd-macro-recording nil
"Boolean for whether or not a macro is currently being recorded.")
(defun toggle-kbd-macro ()
"Toggle macro recording on and off."
(setq kbd-macro-recording nil)
(setq kbd-macro-recording t)
(global-set-key "\C-x\C-r" 'toggle-kbd-macro)
I bound it to C-x C-r instead, since C-m conflicts with my return key.
Michael P. Soulier <address@hidden>, GnuPG pub key: 5BC8BE08
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort." -Harley Hahn, A Student's Guide to Unix
Description: PGP signature