From c18c75669e23f3a2049ce5811309c2e6e8afb73f Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Thu, 16 Mar 2023 15:34:12 -0400 Subject: Update config --- emacs/.config/emacs-kj/init.el | 2 +- emacs/.config/emacs-kj/lisp/kj-lib.el | 2 +- emacs/.config/emacs-kj/lisp/kj-multiple-cursors.el | 29 ++++++++++------------ 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/emacs/.config/emacs-kj/init.el b/emacs/.config/emacs-kj/init.el index 5ea8cc2..10b5b9b 100644 --- a/emacs/.config/emacs-kj/init.el +++ b/emacs/.config/emacs-kj/init.el @@ -266,7 +266,7 @@ ;; Replace bindings. Lazily loaded due by `use-package'. :bind (;; C-c bindings (mode-specific-map) ("C-c h" . consult-history) - ("C-c m" . consult-mode-command) + ;;("C-c m" . consult-mode-command) ("C-c k" . consult-kmacro) ;; C-x bindings (ctl-x-map) ("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command 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 "") 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 "") 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) - -- cgit v1.2.3