[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tue, 26 Mar 2013 11:28:05 +0800
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3)
I am thinking of adding a command kmacro-to-register which would allow
one to store kmacros in registers. Not a heavy user of kmacros I am
interested in knowing if this is generally useful.
I am undecided about the action to take for jump to such a register:
Option 1: restore the kmacro in the register as current
Option 2: just play the kmacro in the register
(define-key kmacro-keymap "x" 'kmacro-to-register)
(defun kmacro-to-register (r)
"Store last keyboard macro in a register R."
(interactive "cLast keyboard macro to register: ")
(set-register r (registerv-make
:jump-func (lambda (v)
(let ((last-kbd-macro v))
:print-func (lambda (v)
(princ (format "a keyboard macro:\n %s"
:insert-func (lambda (v)
(insert (format-kbd-macro v))))))
Leo Liu <=