summaryrefslogtreecommitdiff
path: root/emacs/.config/emacs-kj/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.config/emacs-kj/lisp')
-rw-r--r--emacs/.config/emacs-kj/lisp/kj-lib.el2
-rw-r--r--emacs/.config/emacs-kj/lisp/kj-multiple-cursors.el29
2 files changed, 14 insertions, 17 deletions
diff --git a/emacs/.config/emacs-kj/lisp/kj-lib.el b/emacs/.config/emacs-kj/lisp/kj-lib.el
index 82623bb..5df1822 100644
--- a/emacs/.config/emacs-kj/lisp/kj-lib.el
+++ b/emacs/.config/emacs-kj/lisp/kj-lib.el
@@ -3,7 +3,7 @@
(defmacro define-repeating-key (keymap key cmd &optional desc)
`(let ((def
,(if desc
- `'(,desc ,cmd)
+ `'(,desc . ,cmd)
`',cmd)))
(define-key ,keymap ,key def)
(put ',cmd 'repeat-map ',keymap)))
diff --git a/emacs/.config/emacs-kj/lisp/kj-multiple-cursors.el b/emacs/.config/emacs-kj/lisp/kj-multiple-cursors.el
index b841d9f..962193d 100644
--- a/emacs/.config/emacs-kj/lisp/kj-multiple-cursors.el
+++ b/emacs/.config/emacs-kj/lisp/kj-multiple-cursors.el
@@ -2,22 +2,19 @@
(use-package multiple-cursors
:config
- (defvar kj/multiple-cursors-map
- (let ((map (make-sparse-keymap "cursors")))
- (define-repeating-key map "." mc/mark-next-like-this "→ this")
- (define-repeating-key map "," mc/mark-previous-like-this "← this")
- (define-repeating-key map ">" mc/skip-to-next-like-this "⇥ this")
- (define-repeating-key map "<" mc/skip-to-previous-like-this "⇤ this")
- (define-repeating-key map "<" mc/skip-to-previous-like-this "⇤ this")
- (define-repeating-key map "*" mc/mark-all-like-this "all like this")
- (define-repeating-key map "w" mc/mark-next-like-this-word "word")
- (define-repeating-key map "s" mc/mark-next-like-this-symbol "symbol")
- (define-repeating-key map "(" mc/mark-all-symbols-like-this-in-defun "symbol defun")
- (define-repeating-key map (kbd "DEL") mc/unmark-next-like-this "DEL last")
- (define-repeating-key map (kbd "<delete>") mc/unmark-previous-like-this "DEL first")
- (define-key map (kbd "C-g") '("quit" . ignore))
- map))
+ (defvar kj/multiple-cursors-map (make-sparse-keymap "cursors"))
+ (define-repeating-key kj/multiple-cursors-map "." mc/mark-next-like-this "→ this")
+ (define-repeating-key kj/multiple-cursors-map "," mc/mark-previous-like-this "← this")
+ (define-repeating-key kj/multiple-cursors-map ">" mc/skip-to-next-like-this "⇥ this")
+ (define-repeating-key kj/multiple-cursors-map "<" mc/skip-to-previous-like-this "⇤ this")
+ (define-repeating-key kj/multiple-cursors-map "<" mc/skip-to-previous-like-this "⇤ this")
+ (define-repeating-key kj/multiple-cursors-map "*" mc/mark-all-like-this "all like this")
+ (define-repeating-key kj/multiple-cursors-map "w" mc/mark-next-like-this-word "word")
+ (define-repeating-key kj/multiple-cursors-map "s" mc/mark-next-like-this-symbol "symbol")
+ (define-repeating-key kj/multiple-cursors-map "(" mc/mark-all-symbols-like-this-in-defun "symbol defun")
+ (define-repeating-key kj/multiple-cursors-map (kbd "DEL") mc/unmark-next-like-this "DEL last")
+ (define-repeating-key kj/multiple-cursors-map (kbd "<delete>") mc/unmark-previous-like-this "DEL first")
+ (define-key kj/multiple-cursors-map (kbd "C-g") '("quit" . ignore))
(global-set-key (kbd "C-c m") (cons "cursors" kj/multiple-cursors-map)))
(provide 'kj-multiple-cursors)
-