Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An extensible register system for Emacs
Emacs Lisp
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Extensible Register System

[2013-03-26 Tue] Merged upstream

Mostly merged upstream (see: registerv-make) so no longer needed for recent emacsen (24.x).

Store keyboard macros in registers

Now merged in trunk and will appear in emacs 24.4; see

(require 'kmacro)
(define-key kmacro-keymap "x" 'kmacro-to-register)


(defun kmacro-execute-from-register (k)
  (let ((last-kbd-macro k))
    (kmacro-call-macro current-prefix-arg)))


(defun kmacro-to-register (r)
  "Store the last keyboard macro in register R."
     (or last-kbd-macro (error "No keyboard macro defined"))
     (list (read-char "Save to register: "))))
  (set-register r (registerv-make
		   :jump-func 'kmacro-execute-from-register
		   :print-func (lambda (k)
                                 (princ (format "a keyboard macro:\n   %s"
                                                (format-kbd-macro k))))
		   :insert-func (lambda (k)
                                  (insert (format-kbd-macro k))))))
Something went wrong with that request. Please try again.