summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2021-09-01 08:37:17 -0500
committerCase Duckworth2021-09-01 08:37:17 -0500
commit3d10340f69651608362bacbe91cc10a90bdf4de3 (patch)
tree622d3d6d2d827bacadf0bb74c1d498e8050e7b16 /init.el
parentRename safe-define to safely (diff)
downloademacs-3d10340f69651608362bacbe91cc10a90bdf4de3.tar.gz
emacs-3d10340f69651608362bacbe91cc10a90bdf4de3.zip
Add titlecase
Diffstat (limited to 'init.el')
-rw-r--r--init.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/init.el b/init.el index e3fee58..0eb32db 100644 --- a/init.el +++ b/init.el
@@ -976,11 +976,16 @@ like a dumbass."
976 (setq read-extended-command-predicate 976 (setq read-extended-command-predicate
977 #'command-completion-default-include-p)) 977 #'command-completion-default-include-p))
978 978
979 (defvar case-map (make-sparse-keymap)
980 "A keymap for setting case in various ways.")
981 (global-set-key (kbd "C-c c") case-map)
982
979 (:global "M-=" count-words 983 (:global "M-=" count-words
980 "C-w" kill-region-or-backward-word 984 "C-w" kill-region-or-backward-word
981 "C-c c" capitalize-dwim 985 "C-c c c" capitalize-dwim
982 "C-c u" upcase-dwim 986 "C-c c t" titlecase-dwim
983 "C-c l" downcase-dwim 987 "C-c c u" upcase-dwim
988 "C-c c l" downcase-dwim
984 "C-c d" acdw/insert-iso-date 989 "C-c d" acdw/insert-iso-date
985 "M-`" nil) 990 "M-`" nil)
986 991
@@ -999,6 +1004,7 @@ like a dumbass."
999 (defalias 'backward-word-with-case 'backward-word 1004 (defalias 'backward-word-with-case 'backward-word
1000 "Alias for `backward-word for use in `case-repeat-map'.") 1005 "Alias for `backward-word for use in `case-repeat-map'.")
1001 1006
1007 ;; XXX: this isn't repeating correctly ...
1002 (defvar case-repeat-map 1008 (defvar case-repeat-map
1003 (let ((map (make-sparse-keymap))) 1009 (let ((map (make-sparse-keymap)))
1004 (define-key map "c" #'capitalize-word) 1010 (define-key map "c" #'capitalize-word)