;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310%\207" [require windmove cl-lib custom-declare-group windswap nil "Like windmove, but swaps buffers while moving point." :group frames] 6) #@201 Set up keybindings for `windswap'. Keybindings are of the form MODIFIERS-{left,right,up,down}. Default MODIFIERS are `meta' and `shift'. See also `windmove-default-keybindings'. (fn &rest MODIFIERS) (defalias 'windswap-default-keybindings #[128 "\211\204 \300\301D\262\302\303\304\305\"!\306\"\210\302\303\304\307\"!\310\"\210\302\303\304\311\"!\312\"\210\302\303\304\313\"!\314\"\207" [meta shift global-set-key vector append (left) windswap-left (right) windswap-right (up) windswap-up (down) windswap-down] 6 (#$ . 289) nil]) #@333 Find the swappable window in DIRECTION. Unlike the `windmove' equivalent, this skips over the minibuffer and any dedicated windows, because the contents of those windows cannot be swapped. SIGN is as per that named argument in `window-in-direction'. This function honours the variable `windmove-wrap-around'. (fn DIRECTION SIGN) (defalias 'windswap--find-other-window #[514 "\301\267\202\302\202\303\202\304 \211\3052;\306\307\310&\262\211\2032=\2042\311!\204\312\305\"\210\2020\207" [windmove-wrap-around #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (up 6 down 10)) above below selected-window --cl-block-nil-- window-in-direction nil t window-minibuffer-p throw] 12 (#$ . 832)]) #@63 Report a user error if WINDOW cannot be swapped. (fn WINDOW) (defalias 'windswap--check-window #[257 "\300!\203\n\301\302!\210\303!\205\301\304!\207" [window-minibuffer-p user-error "Can't swap the minibuffer window" window-dedicated-p "Dedicated windows can't be swapped"] 3 (#$ . 1588)]) #@86 Try to swap in DIRECTION. ARG is as for the `windmove' commands. (fn DIRECTION ARG) (defalias 'windswap--do-swap #[514 "\300 \301!\210\302\"\211\204\303\304\"\210\301!\210\305!\210\306!\306!\307\"\210\307\"\207" [selected-window windswap--check-window windswap--find-other-window user-error "No swappable window %s from selected window" select-window window-buffer set-window-buffer] 9 (#$ . 1890)]) #@120 Like `windmove-right', but transpose buffers after switching windows. ARG is as for that function. (fn &optional ARG) (defalias 'windswap-right #[256 "\300\301\"\207" [windswap--do-swap right] 4 (#$ . 2312) "P"]) #@119 Like `windmove-left', but transpose buffers after switching windows. ARG is as for that function. (fn &optional ARG) (defalias 'windswap-left #[256 "\300\301\"\207" [windswap--do-swap left] 4 (#$ . 2534) "P"]) #@117 Like `windmove-up', but transpose buffers after switching windows. ARG is as for that function. (fn &optional ARG) (defalias 'windswap-up #[256 "\300\301\"\207" [windswap--do-swap up] 4 (#$ . 2753) "P"]) #@119 Like `windmove-down', but transpose buffers after switching windows. ARG is as for that function. (fn &optional ARG) (defalias 'windswap-down #[256 "\300\301\"\207" [windswap--do-swap down] 4 (#$ . 2966) "P"]) (provide 'windswap)