summaryrefslogtreecommitdiff
path: root/emacs/.config/emacs-kj/lisp/kj-lib.el
blob: 5df182218e24b32d753b8238cadb35b0eae2c254 (plain)
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)