diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-11-05 12:26:23 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-11-06 10:50:14 -0700 |
commit | 2a0a63ab4a6bab8523e5e37bf7e66b3eeafb0e0d (patch) | |
tree | 399d3fe00a5fc82fa672af24fe03b62070df2e34 | |
parent | e53ff468c242ba4db93502b5eac2b0eb28ae1654 (diff) | |
download | dotfiles-2a0a63ab4a6bab8523e5e37bf7e66b3eeafb0e0d.tar.gz |
spw/back-and-forth-noselect: select the window & rename the command
-rw-r--r-- | .emacs.d/init.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 4bb24694..c195f234 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1239,16 +1239,16 @@ don't consider windows satisfying the predicate EXCLUDE." (setq best-time time) (setq best-window window))))) -(defun spw/back-and-forth-noselect (arg) +(defun spw/back-and-forth (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) (if-let ((window (spw/get-mru-window))) - (select-window window 'mark-for-redisplay) + (select-window window) (user-error "No other window to select")))) -(global-set-key [remap other-window] #'spw/back-and-forth-noselect) +(global-set-key [remap other-window] #'spw/back-and-forth) (defun spw/other-window-noselect (count &optional interactive) (interactive "p\np") |