aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardofSprites <[email protected]>2025-11-23 21:02:24 -0500
committerBardofSprites <[email protected]>2025-11-23 21:02:24 -0500
commit6b6bde3eba7ecac48e94421a8088fb438f7671fe (patch)
tree3f0c8992fb0d4ec61c4dbf83fae0cc979e189829
parentd5ae1ab00c9a9f8b67003437be2577a93c79facd (diff)
don't like this anymore
-rw-r--r--bard-elisp/bard-window.el42
1 files changed, 0 insertions, 42 deletions
diff --git a/bard-elisp/bard-window.el b/bard-elisp/bard-window.el
index f3ac558..c23585f 100644
--- a/bard-elisp/bard-window.el
+++ b/bard-elisp/bard-window.el
@@ -173,46 +173,4 @@ use in `display-buffer-alist'."
for window in windows
do (set-window-buffer window buffer)))))
-;; The ultimate DWIM other window command.
-(defvar pmx--direction -1)
-(defvar pmx--last-win nil)
-(defun pmx-other-window (frame)
- "Switch window, with DWIM behavior.
-Prefix argument FRAME will unconditionally switch frames.
-When called without any windows to switch to, split and select.
-If called not in repeat, reverse directions and switch back to
-usually the most recent window (though not `get-mru-window').
-Finally, when called in repeat, continue in the same direction so
-that we can usually get to the right window faster than an `avy'
-call unless there's a ton of windows for some reason."
- (interactive "P")
- (cond (frame (other-frame 1)) ; unconditional with prefix arg
- ((equal 1 (length (window-list
- (selected-frame))))
- ;; If there is no window or even minibuffer open, split window. Change
- ;; the direction so that we go back to the source window on repeat or
- ;; next call.
- (let ((source (selected-window))
- (tall (> (frame-pixel-height) (frame-pixel-width))))
- (select-window (split-window-right))
- (if (eq source (next-window))
- (setq pmx--direction 1)
- (setq pmx--direction -1)
- (when (not (eq source (previous-window)))
- (warn "Split window sucessor inconsistent")))))
- ((not (eq last-command 'pmx-other-window))
- ;; If we are not repeating an other-window command, reverse the
- ;; direction and select in that direction.
- (if (eq pmx--last-win (selected-window))
- (setq pmx--directionapmx--direction (- pmx--direction))
- ;; we changed windows out of band. Reverse directions.
- (setq pmx--direction -1))
- (other-window pmx--direction))
- (t
- ;; We are repeating. Continue going in the established direction.
- (other-window pmx--direction)))
- (setq pmx--last-win (selected-window)))
-
-(keymap-global-set "C-x o" #'pmx-other-window)
-
(provide 'bard-window)