about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-01-05 11:24:05 -0600
committerCase Duckworth2022-01-05 11:24:05 -0600
commita3fc41f61b6e1f634222970557b8b4aa31ff57fe (patch)
treec45b9619ef726d42768f5a61e1154f4da7056b4a
parentAdd +lookup (diff)
downloademacs-a3fc41f61b6e1f634222970557b8b4aa31ff57fe.tar.gz
emacs-a3fc41f61b6e1f634222970557b8b4aa31ff57fe.zip
Change +casing keymap
-rw-r--r--init.el3
-rw-r--r--lisp/+casing.el16
2 files changed, 11 insertions, 8 deletions
diff --git a/init.el b/init.el index e93ea19..8ebdb45 100644 --- a/init.el +++ b/init.el
@@ -22,8 +22,7 @@
22 (require (or (car-safe feature) feature) (cdr-safe feature) :noerror)) 22 (require (or (car-safe feature) feature) (cdr-safe feature) :noerror))
23 23
24(setup (:require +casing) 24(setup (:require +casing)
25 (with-eval-after-load '+key 25 (:+key "M-c" +casing-map)
26 (define-key +key-mode-map (kbd "C-c c") +casing-map))
27 ;; Unbind default casing bindings 26 ;; Unbind default casing bindings
28 (:global "M-u" nil "M-c" nil "M-l" nil 27 (:global "M-u" nil "M-c" nil "M-l" nil
29 "C-x C-u" nil "C-x C-l" nil)) 28 "C-x C-u" nil "C-x C-l" nil))
diff --git a/lisp/+casing.el b/lisp/+casing.el index 115cb43..fe97310 100644 --- a/lisp/+casing.el +++ b/lisp/+casing.el
@@ -4,12 +4,16 @@
4 4
5(require 'thingatpt) 5(require 'thingatpt)
6 6
7(defvar +casing-map (let ((map (make-sparse-keymap))) 7(defvar +casing-map (make-sparse-keymap)
8 (define-key map "u" #'+upcase-dwim) 8 "Keymap for word-casing.")
9 (define-key map "l" #'+downcase-dwim) 9
10 (define-key map "c" #'+capitalize-dwim) 10(let ((map +casing-map))
11 map) 11 (define-key map "u" #'+upcase-dwim)
12 "Keymap for word-casing.") 12 (define-key map (kbd "M-u") #'+upcase-dwim)
13 (define-key map "l" #'+downcase-dwim)
14 (define-key map (kbd "M-l") #'+downcase-dwim)
15 (define-key map "c" #'+capitalize-dwim)
16 (define-key map (kbd "M-c") #'+capitalize-dwim))
13 17
14;;;###autoload 18;;;###autoload
15(defun +upcase-dwim (arg) 19(defun +upcase-dwim (arg)