;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'cl) #@172 Whether or not to wrap the window jumping behavior. For example, if you jump to the right window and there is no window to the right, jump to the leftmost window instead. (defvar wj-wrap nil (#$ . 102)) #@64 Whether or not to look in other frames for windows to jump to. (defvar wj-jump-frames nil (#$ . 311)) (defalias 'wj-vx #[(v) "@\207" [v] 1]) (defalias 'wj-vy #[(v) "A@\207" [v] 1]) (defalias 'wj-vec #[(x y) " D\207" [x y] 2]) (defalias 'wj-square #[(x) "\211_\207" [x] 2]) (defalias 'wj-vec-dot #[(v1 v2) "\302!\302 !_\303!\303 !_\\\207" [v1 v2 wj-vx wj-vy] 4]) (defalias 'wj-vec- #[(v1 v2) "\302\303!\303 !Z\304!\304 !Z\"\207" [v1 v2 wj-vec wj-vx wj-vy] 5]) (defalias 'wj-vec+ #[(v1 v2) "\302\303!\303 !\\\304!\304 !\\\"\207" [v1 v2 wj-vec wj-vx wj-vy] 5]) (defalias 'wj-vec/ #[(v s) "\302\303! \245\304! \245\"\207" [v s wj-vec wj-vx wj-vy] 4]) (defalias 'wj-vec* #[(v s) "\302\303! _\304! _\"\207" [v s wj-vec wj-vx wj-vy] 4]) (defalias 'wj-vec-length #[(v) "\301\302\303!!\302\304!!\\!\207" [v sqrt wj-square wj-vx wj-vy] 5]) (defalias 'wj-normalize #[(v) "\301\302!\"\207" [v wj-vec/ wj-vec-length] 4]) (defalias 'wj-vec-dist #[(v1 v2) "\302\303 \"!\207" [v1 v2 wj-vec-length wj-vec-] 4]) (defvar wj-inf 1.0e+INF) (defvar -wj-inf -1.0e+INF) (defvar wj-vec-left '(-1 0)) (defvar wj-vec-right '(1 0)) (defvar wj-vec-up '(0 -1)) (defvar wj-vec-down '(0 1)) (defalias 'wj-edges-left #[(edges) "@\207" [edges] 1]) (defalias 'wj-edges-top #[(edges) "A@\207" [edges] 1]) (defalias 'wj-edges-right #[(edges) "\3018\207" [edges 2] 2]) (defalias 'wj-edges-bottom #[(edges) "\3018\207" [edges 3] 2]) #@91 Find the closest point on a line segment (denoted by a pair of vectors LS) and a point P. (defalias 'wj-closest-point-on-seg #[(ls p) "@A@\306\307\n \"!\310\307\n \"!\307 \" \311\f\312 \f\"\"\312\f\"\211\313W\2036 \202F V\203A\n\202F\314 \".\207" [ls ls0 ls1 l d p wj-vec-length wj-vec- wj-normalize wj-vec* wj-vec-dot 0 wj-vec+ pdir result result-dot-d] 6 (#$ . 1734)]) (defalias 'wj-frame-parameter #[(frame param) "\303 \"\211\250\203\n\202\n\204\304\202\n<\205\305\n!)\207" [frame param result frame-parameter 0 eval] 4]) (defalias 'wj-frame-left #[(frame) "\301\302\"\207" [frame wj-frame-parameter left] 3]) (defalias 'wj-frame-right #[(frame) "\301!\302 \\\207" [frame wj-frame-left frame-pixel-width] 2]) (defalias 'wj-frame-top #[(frame) "\301\302\"\207" [frame wj-frame-parameter top] 3]) (defalias 'wj-frame-bottom #[(frame) "\301!\302!\\\207" [frame wj-frame-top frame-pixel-height] 3]) #@32 Get all windows in all frames. (defalias 'wj-all-windows #[nil "\301\302\303\301\304#\210)\207" [windows nil walk-windows #[(window) " B\211\207" [window windows] 2] t] 4 (#$ . 2680)]) #@63 Get all windows other than the selected window in this frame. (defalias 'wj-other-windows #[nil "\300\301 \302 \"\207" [remove selected-window window-list] 3 (#$ . 2875)]) #@63 Get all windows other than the selected window in all frames. (defalias 'wj-all-other-windows #[nil "\300\301 \302 \"\207" [remove selected-window wj-all-windows] 3 (#$ . 3053)]) (byte-code "\300\301!\204\n\301\302M\210\300\207" [fboundp window-pixel-edges window-edges] 2) (defalias 'wj-window-box #[(window) "\306!\211G\307U\203 \211A\242\202\310\311\312 GD\" \211A\242 \211A\242 \242\313\314!!\315\314!!\211\n\\ \\\f\\ \\F.\207" [window #1=#:--cl-rest-- wl wt wr wb window-pixel-edges 4 signal wrong-number-of-arguments (wl wt wr wb) wj-frame-left window-frame wj-frame-top ft fl] 6]) (defalias 'wj-bounding-rect-all-windows #[nil "  \306 \307 \211\203n@ \310 !\211G\311U\203/\211A\242\2027\312\313\314GD\"\211A\242\211A\242\242 ^\f] ^\n]-A\211\204* \f\nF,\207" [wj-inf -wj-inf ymax ymin xmax xmin wj-all-windows nil wj-window-box 4 signal wrong-number-of-arguments (wl wt wr wb) window --dolist-tail-- #1=#:--cl-rest-- wl wt wr wb] 5]) (defalias 'wj-window-segments #[(window) "\306!\211G\307U\203 \211A\242\202\310\311\312 GD\" \211A\242 \211A\242 \242\n D\n DD\n D\f DD\f D\f DD\f D\n DDF-\207" [window #1=#:--cl-rest-- left top right bottom wj-window-box 4 signal wrong-number-of-arguments (left top right bottom)] 7]) (defalias 'wj-window-midpoint #[(window) "\306!\211G\307U\203 \211A\242\202\310\311\312 GD\" \211A\242 \211A\242 \242\n\f\nZ\313\245\\ Z\313\245\\-D\207" [window #1=#:--cl-rest-- left top right bottom wj-window-box 4 signal wrong-number-of-arguments (left top right bottom) 2] 5]) (defalias 'wj-window-contain #[(window pos) "\306!\211G\307U\203 \211A\242\202\310\311\312 GD\" \211A\242 \211A\242 \242\313 !\nV\205K\313 !\fW\205K\314 ! V\205K\314 ! W-\207" [window #1=#:--cl-rest-- left top right bottom wj-window-box 4 signal wrong-number-of-arguments (left top right bottom) wj-vx wj-vy pos] 5]) (defalias 'wj-point-window-distance #[(p window) "\301\302\303\304\305!\"\"\207" [window apply min mapcar #[(ls) "\302\303 \" \"\207" [ls p wj-vec-dist wj-closest-point-on-seg] 4] wj-window-segments] 6]) (defalias 'wj-closest-point-on-window #[(p window) "\301\302\303\304!\"\305\"@\207" [window sort mapcar #[(ls) "\302 \"\207" [ls p wj-closest-point-on-seg] 3] wj-window-segments #[(p1 p2) "\303 \"\303\n \"W\207" [p1 p p2 wj-vec-dist] 4]] 5]) (defalias 'wj-cursor-pos #[nil "\302\303 \304 \305#\306\304 !\211\204\307\310!\311!\"\307\312\313 !\314\245\315 !\\\312\316 !\314\245\317 !\\\"\307\310!\315 !\\\320!\317 !\\\"*\207" [box pos pos-visible-in-window-p window-point selected-window t wj-window-box wj-vec wj-edges-left wj-edges-bottom float frame-char-width 2 wj-vx frame-char-height wj-vy wj-edges-top] 6]) (defalias 'wj-goto-window #[(window) "\301\302!\302\303 !\"\204\304\302!!\210\305!\207" [window eql window-frame selected-window select-frame-set-input-focus select-window] 4]) (defalias 'wj-jump-origin #[(d) "\306\307 !\211G\310U\203\211A\242\202\311\312\313GD\"\211A\242\211A\242\242\314 \232\203?\315 \316 !\"\202o\232\203P\315 \316 !\"\202o\232\203a\315\317 !\n\"\202o\232\205o\315\317 !\f\".\207" [#1=#:--cl-rest-- wl wt wr wb pos wj-window-box selected-window 4 signal wrong-number-of-arguments (wl wt wr wb) wj-cursor-pos wj-vec wj-vy wj-vx d wj-vec-left wj-vec-right wj-vec-up wj-vec-down] 5]) (defalias 'wj-wrap-jump-origin #[(o d) "\306 \211G\307U\203\211A\242\202\310\311\312GD\"\211A\242\211A\242\242 \232\203;\313 T\314!\"\202n \232\203M\313 S\314!\"\202n \232\203_\313\315!\fT\"\202n \232\205n\313\315!\nS\"-\207" [#1=#:--cl-rest-- fl ft fr fb d wj-bounding-rect-all-windows 4 signal wrong-number-of-arguments (fl ft fr fb) wj-vec wj-vy wj-vx wj-vec-left o wj-vec-right wj-vec-up wj-vec-down] 5]) (defalias 'wj-get-windows-in-direction #[(o d windows) "\301\302\"\207" [windows remove-if #[(window) "\304\305 \"\"\306\n!\307U?\205\310\n \"\307X)\207" [o window to-window-vec d wj-vec- wj-closest-point-on-window wj-vec-length 0 wj-vec-dot] 4]] 3]) (defalias 'wj-get-window-distances #[(o windows) "\301\302\303\"\304\"\207" [windows sort mapcar #[(window) "\302 \"B\207" [window o wj-point-window-distance] 4] #[(x1 x2) "A AW\207" [x1 x2] 2]] 4]) (defalias 'wj-closest-window #[(o d windows) "\303\304 \n#\"@@\207" [o d windows wj-get-window-distances wj-get-windows-in-direction] 6]) #@128 Set the window in direction D as the selected window. D should be one of wj-vec-left, wj-vec-right, wj-vec-down, or wj-vec-up. (defalias 'window-jump #[(d) "\306 \203\n\307\202 \310 \203\311\202\312\f\2031\313 ! \"?\2058\314\315 \"\n \"\2028\313 ! \"+\207" [#1=#:--cl-attempt-jump-- wj-jump-frames all-wnd-fn other-wnd-fn wj-wrap d #[(o windows) "\304 \n#\211\205\305 !\210\306 \210\307)\207" [o d windows window wj-closest-window wj-goto-window deactivate-mark t] 5] wj-all-windows window-list wj-all-other-windows wj-other-windows wj-jump-origin wj-wrap-jump-origin wj-cursor-pos] 4 (#$ . 7549)]) #@55 Move to the window to the left of the current window. (defalias 'window-jump-left #[nil "\301!\207" [wj-vec-left window-jump] 2 (#$ . 8176) nil]) #@56 Move to the window to the right of the current window. (defalias 'window-jump-right #[nil "\301!\207" [wj-vec-right window-jump] 2 (#$ . 8329) nil]) #@46 Move to the window below the current window. (defalias 'window-jump-down #[nil "\301!\207" [wj-vec-down window-jump] 2 (#$ . 8485) nil]) #@46 Move to the window above the current window. (defalias 'window-jump-up #[nil "\301!\207" [wj-vec-up window-jump] 2 (#$ . 8629) nil]) (provide 'window-jump)