Function: hycontrol-window-swap-buffers
hycontrol-window-swap-buffers is an interactive and byte-compiled
function defined in hycontrol.el.
Signature
(hycontrol-window-swap-buffers)
Documentation
Swap the buffers displayed in two windows in the selected frame and return t.
Swap which window is selected so that the current buffer remains the same. Do nothing and return nil if there are not precisely two windows.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hycontrol.el
(defun hycontrol-window-swap-buffers ()
"Swap the buffers displayed in two windows in the selected frame and return t.
Swap which window is selected so that the current buffer remains
the same. Do nothing and return nil if there are not precisely
two windows."
(interactive)
(let ((windows (window-list nil 'no-mini))
buf1 buf2)
(when (= 2 (length windows))
(setq buf1 (window-buffer (car windows))
buf2 (window-buffer (cadr windows)))
(set-window-buffer (car windows) buf2)
(set-window-buffer (cadr windows) buf1)
(other-window 1)
t)))