summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-11-08 10:37:46 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-11-08 10:37:46 -0700
commit9a8a8b2d962c490907faed556cd4c4daaa4a7c7d (patch)
tree61b02ce723dc4c80944468fa954bfcb81d4504ec
parenta8158244e70ccdb177e1f3afaa48781ac8e8ffb2 (diff)
downloaddotfiles-9a8a8b2d.tar.gz
add cycling to C-x o
-rw-r--r--.emacs.d/init-spw.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/.emacs.d/init-spw.el b/.emacs.d/init-spw.el
index 5702eafa..fb0725fe 100644
--- a/.emacs.d/init-spw.el
+++ b/.emacs.d/init-spw.el
@@ -575,6 +575,7 @@ different meanings for `repeat' and for
;; don't select the windows we cycle through, so that the window where we
;; started becomes the most recently selected window
(([?\C-x left] . spw/backward-other-window-noselect)
+ ([remap other-window] . spw/back-and-forth-noselect)
([?\C-x right] . spw/other-window-noselect))
#'spw/other-window-noselect
;; select the destination window again with NOSELECT nil
@@ -1686,14 +1687,13 @@ I use by default)."
(setq best-time time)
(setq best-window window)))))
-(defun spw/back-and-forth (arg)
+(defun spw/back-and-forth-noselect (arg)
(interactive "P")
(if arg
;; if there's a prefix arg then just `other-window', so that's still
;; available on M-1 C-x o
(call-interactively #'other-window)
- (select-window (spw/get-mru-window))))
-(global-set-key [remap other-window] #'spw/back-and-forth)
+ (select-window (spw/get-mru-window) 'mark-for-redisplay)))
(defun spw/set-other-window-to-scroll (arg)
"Set `other-window-scroll-buffer' to the most recently used window.