summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-05-31 14:51:15 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-05-31 18:56:14 -0700
commitcc6b67e323d914a98283a404e3b2b2d9067cc472 (patch)
treeb8bad11741dee1c4969c59f2c6aa3d365b66ec08
parent65f7a8781b17808dabbfa88dc4b2a419458f99d6 (diff)
downloaddotfiles-cc6b67e323d914a98283a404e3b2b2d9067cc472.tar.gz
move control key chording rebindings upwards
-rw-r--r--.emacs.d/init-spw.el46
1 files changed, 23 insertions, 23 deletions
diff --git a/.emacs.d/init-spw.el b/.emacs.d/init-spw.el
index 0b5fb822..87fbb5a5 100644
--- a/.emacs.d/init-spw.el
+++ b/.emacs.d/init-spw.el
@@ -202,6 +202,29 @@ add places the library might be available to `load-path'."
(with-eval-after-load 'org
(spw/remap-mark-command 'org-mark-subtree org-mode-map))
+;; In an effort to reduce chording with the control key, provide
+;; alternative access to the C-c and C-x keymaps. Use right alt for
+;; M-r, left alt for M-i.
+;;
+;; Best for entering commands where the key after C-c/C-x is not
+;; modified by control. Otherwise best to just keep control held down
+;; and type both modified keys.
+(defun spw/access-ctl-c-bindings (arg)
+ "Access bindings under C-c."
+ (interactive "P")
+ (setq prefix-arg arg
+ unread-command-events (cons '(t . ?\C-c) unread-command-events)))
+(global-set-key "\M-r" #'spw/access-ctl-c-bindings)
+(defun spw/access-ctl-x-bindings (arg)
+ "Access bindings under C-x."
+ (interactive "P")
+ (setq prefix-arg arg
+ unread-command-events (cons '(t . ?\C-x) unread-command-events)))
+(global-set-key "\M-i" #'spw/access-ctl-x-bindings)
+
+;; resettle the previous occupant of M-i
+(global-set-key "\M-I" #'tab-to-tab-stop)
+
;;;; Assorted packages
@@ -822,29 +845,6 @@ Passes ARG to `projectile-switch-project-by-name'."
(use-package haskell-tab-indent
:if (spw--optional-pkg-available-p "haskell-tab-indent"))
-;; In an effort to reduce chording with the control key, provide
-;; alternative access to the C-c and C-x keymaps. Use right alt for
-;; M-r, left alt for M-i.
-;;
-;; Best for entering commands where the key after C-c/C-x is not
-;; modified by control. Otherwise best to just keep control held down
-;; and type both modified keys.
-(defun spw/access-ctl-c-bindings (arg)
- "Access bindings under C-c."
- (interactive "P")
- (setq prefix-arg arg
- unread-command-events (cons '(t . ?\C-c) unread-command-events)))
-(global-set-key "\M-r" 'spw/access-ctl-c-bindings)
-(defun spw/access-ctl-x-bindings (arg)
- "Access bindings under C-x."
- (interactive "P")
- (setq prefix-arg arg
- unread-command-events (cons '(t . ?\C-x) unread-command-events)))
-(global-set-key "\M-i" 'spw/access-ctl-x-bindings)
-
-;; resettle the previous occupant of M-i
-(global-set-key "\M-I" 'tab-to-tab-stop)
-
;;; jump back and forth to and from Emacs lisp definitions with
;;; M-. and M-, and C-c C-d [C-]d to describe