1 2 3 4 5 6 7 8 9 10 11
;;; -*- lexical-binding: t; -*- (defmacro define-repeating-key (keymap key cmd &optional desc) `(let ((def ,(if desc `'(,desc . ,cmd) `',cmd))) (define-key ,keymap ,key def) (put ',cmd 'repeat-map ',keymap))) (provide 'kj-lib)