;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305\306\307\310\311\312\313\314\315\316F\312\317\312\320& \210\302\321\304\322\306\307\310\303&\210\323\324\325\326\327\330\310\303&\210\323\331\332\333\327\334\310\303&\210\323\335\336\337\327\340\310\303&\210\323\341\336\342\327\343\344\345\346\347\350\301\310\303& \210\323\351\336\352\327\343\310\303&\210\323\353\354\355\327\356\310\303&\210\323\357\360\361\327\356\310\303&\210\323\362\304\363\327\364\310\303&\210\323\365\304\366\327\367\310\303&\210\323\370\304\371\327\372\310\303&\207" [require windmove custom-declare-group win-switch nil "All customization options for win-switch mode." :prefix "win-switch-" :group convenience :link url-link :tag "Send Bug Report" "mailto:genovese@cmu.edu?subject=win-switch.el bug: &body=Describe bug here, starting with `emacs -q'. Be sure to include your platform and your Emacs and win-switch versions." (url-link :tag "Download" "http://www.github.com/genovese/emacs-utils/win-switch") (url-link :tag "Description" "http://www.emacsiki.org/cgi-bin/wiki/WinSwitch") win-switch-keys "Command key bindings for win-switch mode." custom-declare-variable win-switch-idle-time 0.75 "Cancel window switching mode when idle time exceeds this threshold.\nThe time is measured in seconds and can be an integer or\nfloating-point number." :type number win-switch-window-threshold 2 "Number of windows above which dispatch always enters switching mode.\nWhen the current frame has more than this many windows,\n`win-switch-dispatch' enters window-switching mode\nunconditionally; otherwise, it acts like like\n`win-switch-other-window-function' (which is `other-window' by\ndefault).\n\nBesides its effect on window switching behavior, this option also\naffects how `win-switch-dispatch' interprets its prefix argument.\nSee the documentation for `win-switch-dispatch' for details." integer win-switch-other-window-first t "Whether to move to next window before entering window switching mode.\nShould be either a boolean or a boolean function that takes no arguments.\nIf equal to t or if a function and the function returns a non-nil value,\n`win-switch-dispatch' calls `win-switch-next-window' before changing\nwindow-switching modes." (choice boolean function) win-switch-wrap-around "Whether movement off the edge of the frame wraps around.\n\nTo set this variable in Lisp code, do not set the variable\ndirectly but rather call the function\n`win-switch-set-wrap-around' with argument 1 to turn wrapping\non and -1 to turn wrapping off." boolean :set #[(symbol value) "\301\203 \302\202\n\303!\207" [value win-switch-set-wrap-around 1 -1] 2] :initialize #[(symbol value) "\303\n\"\207" [value windmove-wrap-around symbol custom-initialize-default] 3] :require win-switch-provide-visual-feedback "Whether to provide visual feedback during window switching mode." win-switch-feedback-background-color "red" "Mode line background color of active window during switching mode." string win-switch-feedback-foreground-color "white" "Mode line foreground color of active window during switching mode." win-switch-on-feedback-function "Function to turn on visual feedback, or nil for default behavior.\nThis function of zero arguments is called when entering window\nswitching mode, and it should set up conditions that make salient\nthat window switching mode is turned on. Setting this function\nshould usually be paired with setting\n`win-switch-off-feedback-function' to ensure that what is set on\nentry is unset on exit. See `win-switch-on-feedback' for the\ndefault behavior." (choice (const :tag "Default" nil) function) win-switch-off-feedback-function "Function to turn off visual feedback, or nil for default behavior.\nThis function of zero arguments is called when exiting window\nswitching mode, and it should make salient that window switching\nmode is turned off and clear any conditions that were set on\nentry. Setting this function should usually be paired with\nsetting `win-switch-on-feedback-function' to ensure that what is\nunset on exit had been set on entry. See the function\n`win-switch-off-feedback' for the default behavior." (choice (const :tag "Default" nil) function) win-switch-other-window-function "Function to switch windows or nil for default, `other-window'." (choice (const :tag "Default" nil) function)] 14) #@66 List of functions to be called when win-switch module is loaded. (defvar win-switch-load-hook nil (#$ . 4428)) #@174 List of functions to be called as window switching mode is entered. These functions are called just before the overriding key map is set up and before the timer is started. (defvar win-switch-on-hook nil (#$ . 4546)) #@164 List of functions to be called after window switching mode is exited. These functions are called after the timer is cleared and the overriding key map is restored (defvar win-switch-off-hook nil (#$ . 4770)) #@616 List of functions that check if `win-switch-dispatch' should be aborted. These functions are called in succession at `win-switch-dispatch' just before entering window-switching mode and after checking the usual conditions on the window threshold and prefix arguments. If any function in this list returns a non-nil value, window-switching mode is not entered. If the returned value is 'abort, then no action is taken; for any other non-nil value `win-switch-next-window' is still called. The primary purpose of these hooks is to allow for conditions where the persistent mode can cause conflicts or other problems. (defvar win-switch-abort-hook nil (#$ . 4985)) (byte-code "\300\301\302\303\304\305\306\307\310\311\312\313& \210\300\314\315\316\304\317\306\307\310\311\312\313& \210\300\320\321\322\304\323\306\307\310\311\312\313& \210\300\324\325\326\304\327\306\307\310\311\312\313& \210\300\330\331\332\304\333\306\307\310\311\312\313& \210\300\334\335\336\304\337\306\307\310\311\312\313& \210\300\340\341\342\304\343\306\307\310\311\312\313& \210\300\344\345\346\304\347\306\307\310\311\312\313& \210\300\350\351\352\304\353\306\307\310\311\312\313& \210\300\354\355\356\304\357\306\307\310\311\312\313& \210\300\360\361\362\304\363\306\307\310\311\312\313& \210\300\364\365\366\304\367\306\307\310\311\312\313& \210\300\370\371\372\304\373\306\307\310\311\312\313& \210\300\374\375\376\304\377\306\307\310\311\312\313& \210\300\201@\201A\201B\304\201C\306\307\310\311\312\313& \210\300\201D\201E\201F\304\201G\306\307\310\311\312\313& \210\300\201H\201I\201J\304\201K\306\201L\310\311\312\313& \210\300\201M\201N\201O\304\201P\306\201Q\310\311\312\313& \207" [custom-declare-variable win-switch-up-keys '("i") "List of key sequences that select the window above the current one.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'up)\n\nwhere is a list of key bindings." :type (repeat (sexp :format "%v")) :set win-switch-custom-set-keys :initialize custom-initialize-default :group win-switch-keys win-switch-down-keys '("k") "List of key sequences that select the window below the current one.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'down)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-left-keys '("j") "List of key sequences that select the window left of the current one.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'left)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-right-keys '("l") "List of key sequences that select the window left of the current one.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'right)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-next-window-keys '("o") "List of key sequences that select the next window.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'next-window)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-previous-window-keys '("p") "List of key sequences that select the next window.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'previous-window)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-enlarge-vertically-keys '("I") "List of key sequences that vertically enlarges current window.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'enlarge-vertically)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-shrink-vertically-keys '("K") "List of key sequences that vertically shrinks current window.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'shrink-vertically)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-shrink-horizontally-keys '("J") "List of key sequences that horizontally shrinks current window.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'shrink-horizontally)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-enlarge-horizontally-keys '("L") "List of key sequences that horizontally enlarges current window.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'enlarge-horizontally)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-other-frame-keys '(" ") "List of key sequences that select the next frame.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'other-frame)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-exit-keys '("u" [return]) "List of key sequences that will exit window switching mode.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'exit)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-split-horizontally-keys '(";") "List of key sequences that horizontally splits current window.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'split-horizontally)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-split-vertically-keys '("h") "List of key sequences that vertically splits current window.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'split-vertically)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-delete-window-keys '("0") "List of key sequences that deletes current window.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'delete-window)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-emergency-exit-keys '("\207") "List of additional key sequences that will exit window switching mode.\nThis exits window switching without any niceties, feedback, or\nhooks and so should be used only as a last resort. It is intended\nonly as a precaution for cases in which an unexpected\nproblem (e.g., in user defined hooks or function-valued options)\nmakes it impossible to exit window switching mode by another way.\nThis should not need really be necessary and may be removed in\nfuture versions.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-keys' as follows:\n\n (win-switch-set-keys 'emergency-exit)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) win-switch-once-double-next-keys '("u") "List of keys that will advance two windows in `win-switch-dispatch-once'.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-once-keys' as follows:\n\n (win-switch-set-once-keys 'once-double-next)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) #[(sym value) "\301\302\"\207" [value win-switch-set-once-keys once-double-next] 3] win-switch-once-double-prev-keys '("y") "List of keys that will move back two windows in `win-switch-dispatch-once'.\n\nTo set this variable from Lisp code, do not just set it directly, but\nrather use the function `win-switch-set-once-keys' as follows:\n\n (win-switch-set-once-keys 'once-double-prev)\n\nwhere is a list of key bindings." (repeat (sexp :format "%v")) #[(sym value) "\301\302\"\207" [value win-switch-set-once-keys once-double-prev] 3]] 12) #@491 Adjust keymap MAP to include proper exit defaults. Returns a modified version of MAP that may share some structure with the original. In the modified map itself and in any sub-keymaps, a default binding is added, if a default is not already present. The default is bound to `win-switch-exit-and-redo'. This ensures that unbound key sequences exit from window switching mode. Without this, adding a sparse prefix key map can shadow the default binding for unbound keys with the same prefix. (defalias 'win-switch--fix-keymap-defaults #[(map) "\302\303\"\304 \305\"\204\306 \307\310#\210 )\207" [map fixed-map mapcar #[(entry) ":\203\301A!\203\302A\303\"\204@\304A!B\207\207" [entry keymapp lookup-key [t] win-switch--fix-keymap-defaults] 3] lookup-key [t] define-key [t] win-switch-exit-and-redo] 4 (#$ . 13942)]) #@69 Associates pre-defined key lists to window-switching mode commands. (defvar win-switch-commands '((win-switch-up-keys . win-switch-up) (win-switch-down-keys . win-switch-down) (win-switch-left-keys . win-switch-left) (win-switch-right-keys . win-switch-right) (win-switch-next-window-keys . win-switch-next-window) (win-switch-previous-window-keys . win-switch-previous-window) (win-switch-enlarge-vertically-keys . enlarge-window) (win-switch-shrink-vertically-keys . shrink-window) (win-switch-shrink-horizontally-keys . shrink-window-horizontally) (win-switch-enlarge-horizontally-keys . enlarge-window-horizontally) (win-switch-other-frame-keys . win-switch-other-frame) (win-switch-exit-keys . win-switch-exit) (win-switch-split-vertically-keys . split-window-vertically) (win-switch-split-horizontally-keys . split-window-horizontally) (win-switch-delete-window-keys . delete-window) (win-switch-emergency-exit-keys . win-switch-emergency-exit)) (#$ . 14777)) #@91 Associates once-only key lists to dispatch-once commands. See `win-switch-dispatch-once'. (defvar win-switch-once-commands '((win-switch-once-double-next-keys . win-switch-double-next-window) (win-switch-once-double-prev-keys . win-switch-double-previous-window)) (#$ . 15749)) #@458 Keymap that is active during window switching mode. The functions `win-switch-set-keys', `win-switch-add-key', and `win-switch-delete-key', can be used to set parts of this keymap corresponding to the available commands. To add an arbitrary command to this keymap, use `win-switch-define-key' rather than changing this variable directly. If you do change this keymap directly, using `define-key' for instance, be very careful to leave an exit key available (defvar win-switch-map (byte-code "\306  \204 \307\310!\210\n\311\211\2039\f@\211@J\311\211\2031\f@\312 A#\210\fA\211\204 *\fA\211\204*\312\313\314#\210\315!)\207" [map win-switch-exit-keys win-switch-commands cmdpair --dolist-tail-- key make-sparse-keymap error "The exit keys list for win-switch must remain non-empty" nil define-key [t] win-switch-exit-and-redo win-switch--fix-keymap-defaults] 5) (#$ . 16034)) #@269 Keymap referenced by `win-switch-dispatch-once' to make simple moves. Commands using this keymap do *not* enter window-switching mode, so no exit keys or commands are required (or helpful). It is safe to assign directly to this keymap. See `win-switch-dispatch-once.' (defvar win-switch-once-map (byte-code "\306\307!\310 \n\311#\311\211\203L\f@\211@ A\211 J\311\211\203D\f@ \312=\204= \313=\204=\314 #\210\fA\211\204$,\fA\211\204*)\207" [map win-switch-commands win-switch-once-commands cmdpair --dolist-tail-- cmd make-sparse-keymap "Window Switching" append nil win-switch-exit-keys win-switch-emergency-exit-keys define-key keysym key] 5) (#$ . 16932)) #@75 When non-nil, measures the idle time until window switching mode expires. (defvar win-switch-timer nil (#$ . 17621)) #@58 Non-nil when window switching mode is on, nil otherwise. (defvar win-switch-engaged nil (#$ . 17744)) #@56 Stack to hold saved values of `overridiing-local-map'. (defvar win-switch-overriding-map-stack nil (#$ . 17852)) #@63 Holds cons with previous mode-line background and foreground. (defvar win-switch-saved-mode-line-faces nil (#$ . 17971)) #@73 Holds list of frames visited during a single window-switching interval. (defvar win-switch-visited-frames-list nil (#$ . 18098)) #@225 Run for SECS seconds before excecuting function FUNC, if SECS is non-nil. Uses `win-switch-timer', if valid, canceling it before restarting. If non-nil, SECS should be a number or time; FUNC should be a symbol or function. (defalias 'win-switch--start-timer #[(secs func) "\205 \203\303 !\203\304 !\210\305\306\n#\211\207" [secs win-switch-timer func timerp cancel-timer run-with-idle-timer nil] 4 (#$ . 18234)]) #@50 Cancel and nullify `win-switch-timer', if valid. (defalias 'win-switch--clear-timer #[nil "\205\301!\203\302!\210\303\211\207" [win-switch-timer timerp cancel-timer nil] 2 (#$ . 18663)]) #@66 Save keymap bound to symbol MAP and set MAP to `win-switch-map'. (defalias 'win-switch--override-map '(macro . #[(map) "\301\302\303\304\305\306BBDE\307\310BBE\311\312BBE\207" [map progn when and not eq ((car win-switch-overriding-map-stack)) push (win-switch-overriding-map-stack) setq (win-switch-map)] 8 (#$ . 18864)])) #@57 Reset symbol MAP's value to most recently saved keymap. (defalias 'win-switch--restore-map '(macro . #[(map) "\301\302BB\207" [map setq ((pop win-switch-overriding-map-stack))] 3 (#$ . 19197)])) #@133 Are there enough windows on MAYBE-FRAME to enter window-switching mode? Frame defaults to the selected frame if MAYBE-FRAME is nil. (defalias 'win-switch--enough-windows-p #[(&optional maybe-frame) "\206\303 \n\304X\206\n\305 !\233)\207" [maybe-frame frame win-switch-window-threshold selected-frame 0 window-list] 3 (#$ . 19400)]) (defalias 'win-switch-up #[(&optional arg) "\3011\n\302\303\"0\207\210\304\207" [arg (error) windmove-do-window-select up nil] 3 nil "P"]) (defalias 'win-switch-down #[(&optional arg) "\3011\n\302\303\"0\207\210\304\207" [arg (error) windmove-do-window-select down nil] 3 nil "P"]) (defalias 'win-switch-left #[(&optional arg) "\3011\n\302\303\"0\207\210\304\207" [arg (error) windmove-do-window-select left nil] 3 nil "P"]) (defalias 'win-switch-right #[(&optional arg) "\3011\n\302\303\"0\207\210\304\207" [arg (error) windmove-do-window-select right nil] 3 nil "P"]) #@487 Move to next window in window list. ARG is in raw prefix argument format, and INTERACTIVE? is non-nil if the function was called interactively. When `win-switch-other-window-function' is non-nil, call that function, either interactively when INTERACTIVE? is non-nil or passing arg otherwise. When it is nil, calls `other-window' with the numeric value of ARG. This is a wrapper that allows the user to override the standard window switching behavior, for instance when using icicles. (defalias 'win-switch-next-window #[(arg &optional interactive\?) "\203 \203\f\303\300!\207\n!\207\304\305\n!!\207" [win-switch-other-window-function interactive\? arg call-interactively other-window prefix-numeric-value] 3 (#$ . 20323) "P\np"]) #@41 Move to previous window in window list. (defalias 'win-switch-previous-window #[(arg &optional interactive\?) "\302[ \"\207" [arg interactive\? win-switch-next-window] 3 (#$ . 21066) "p\np"]) #@37 Advance two windows in window list. (defalias 'win-switch-double-next-window #[nil "\300\301!\207" [win-switch-next-window 2] 2 (#$ . 21265) nil]) #@48 Move to second previous window in window list. (defalias 'win-switch-double-previous-window #[nil "\300\301!\207" [win-switch-next-window -2] 2 (#$ . 21418) nil]) #@146 Select the ARGth different visible frame on current display, and raise it. Like `other-frame' but correctly cleans up visual feedback settings. (defalias 'win-switch-other-frame #[(&optional arg) "\203 \204 \304 \210\305\n!\210\205 ?\205\306 \207" [win-switch-provide-visual-feedback win-switch-off-feedback-function arg win-switch-on-feedback-function win-switch-off-feedback-mode-line other-frame win-switch-on-feedback-mode-line] 2 (#$ . 21588) "p"]) #@65 Alert users, usually in echo area, that window switching is on. (defalias 'win-switch-on-alert #[nil "\300\301!\207" [message "Window Switching Mode On..."] 2 (#$ . 22058)]) #@66 Alert users, usually in echo area, that window switching is off. (defalias 'win-switch-off-alert #[nil "\300\301!\210\302\303\304\305#\207" [message "Window Switching Mode Off." run-with-timer 0.5 nil #[nil "\300\301!\207" [message nil] 2]] 4 (#$ . 22238)]) #@65 Provide visual feedback for the start of window switching mode. (defalias 'win-switch-on-feedback #[nil "\203 \207\302 \210\303\304\305\"\303\304\306\"B\307 \207" [win-switch-on-feedback-function win-switch-saved-mode-line-faces win-switch-on-alert face-attribute mode-line :background :foreground win-switch-on-feedback-mode-line] 4 (#$ . 22502)]) #@317 Provide feedback via mode-line colors for start of window switching mode. This function only changes the mode-line foreground and background in the *current frame*, and only if they are different from the saved colors in `win-switch-saved-mode-line-faces', which should be set on entry into window-switching mode. (defalias 'win-switch-on-feedback-mode-line #[nil "\306   @=\204\307\310 \f#\210\n A=?\205!\311\310\n\f#+\207" [win-switch-feedback-background-color win-switch-feedback-foreground-color foreground background this-frame win-switch-saved-mode-line-faces selected-frame set-face-background mode-line set-face-foreground] 4 (#$ . 22863)]) #@63 Provide visual feedback for the end of window switching mode. (defalias 'win-switch-off-feedback #[nil "\203 \207\302 \210\303 \210\304\211\207" [win-switch-off-feedback-function win-switch-saved-mode-line-faces win-switch-off-alert win-switch-off-feedback-mode-line nil] 2 (#$ . 23528)]) #@280 Provide feedback via mode-line colors for end of window switching mode. This function only changes the mode-line foreground and background in the *current frame*, and only if `win-switch-saved-mode-line-faces' is non-nil and contains different colors than the current settings. (defalias 'win-switch-off-feedback-mode-line #[nil "\205,\304 @A\n\305\306\307\"=\204\310\306\n #\210 \305\306\311\"=?\205+\312\306 #+\207" [win-switch-saved-mode-line-faces foreground background this-frame selected-frame face-attribute mode-line :background set-face-background :foreground set-face-foreground] 4 (#$ . 23829)]) #@36 Engage window switching interface. (defalias 'win-switch-begin-override #[nil "?\205/\3061\307\310!0\210\202\311\312 \")\210\n\203'\n @=\204'\n B\f\313\314 \315\"\207" [win-switch-engaged err-val overriding-local-map win-switch-overriding-map-stack win-switch-map win-switch-idle-time (error) run-hooks win-switch-on-hook message "win-switch encountered error (%s) in on hook" t win-switch--start-timer win-switch-exit-by-timeout] 3 (#$ . 24454)]) #@39 Disengage window switching interface. (defalias 'win-switch-end-override #[nil "\205\304 \210\305 \211A\242\3061\307\310!0\207\311\312 \")\207" [win-switch-engaged win-switch-overriding-map-stack overriding-local-map err-val win-switch--clear-timer nil (error) run-hooks win-switch-off-hook message "win-switch encountered error (%s) in off hook"] 3 (#$ . 24920)]) #@44 Enter window switching mode with feedback. (defalias 'win-switch-enter #[nil "\301 \210\205 \302 \207" [win-switch-provide-visual-feedback win-switch-begin-override win-switch-on-feedback] 1 (#$ . 25300) nil]) #@43 Exit window switching mode with feedback. (defalias 'win-switch-exit #[nil "\301 \210\205 \302 \207" [win-switch-provide-visual-feedback win-switch-end-override win-switch-off-feedback] 1 (#$ . 25518) nil]) #@293 Exit window switching mode when timer expires. Because an idle timeout necessarily occurs when Emacs is waiting for an input event, with a stored copy of the active keymaps, ending the override does not take effect until *after* the next command. This functions issues an exit command event. (defalias 'win-switch-exit-by-timeout #[nil "\205 @\304\305\n! \"\211)\207" [win-switch-engaged win-switch-exit-keys key unread-command-events append listify-key-sequence] 3 (#$ . 25734) nil]) #@51 Exit from window switching mode without niceties. (defalias 'win-switch-emergency-exit #[nil "\301\302 \210\303 )\207" [win-switch-off-hook nil win-switch-end-override win-switch-off-alert] 1 (#$ . 26230) nil]) #@62 End window switching mode and re-execute the last key event. (defalias 'win-switch-exit-and-redo #[nil "\302 \303 \210\304\305! \"\211)\207" [my-keys unread-command-events this-command-keys-vector win-switch-exit append listify-key-sequence] 3 (#$ . 26448) nil]) #@345 Remove each key in KEY-LIST from all predefined keylists. This is used to keep the predefined keylists synchronized with updates, additions, and deletions. KEY-LIST should be a list of keybindings. The predefined keylists are the customizable variables listed as the keys in `win-switch-commands'. No keymap changes are made by this function. (defalias 'win-switch-clear-from-keylists #[(key-list) "\306\307\"\211\310\211\205> @\211J \310\n\211\2035 @\211\n\f\235\203.\n\311\n\f\"L\210 A\211\204+ A\211\204 \310+\207" [win-switch-commands keyvars keyvar --dolist-tail-- keys key-list mapcar car nil delete key] 5 (#$ . 26721)]) #@774 Set specified key list and adjust `win-switch-map' and other key lists. This is the most general function for changing the bindings of commands represented in the predefined key lists. See also `win-switch-set-keys', which is the API entry point to this function, along with `win-switch-add-key' and `win-switch-delete-key'. Note that changing `win-switch-map' directly need not be reliable, and also see `win-switch-define-key' for a safe way to make general bindings. KEY-SYM is a symbol that must be represented in the alist `win-switch-commands'. The corresponding list of keys will be set to KEY-LIST, which should be a list of keybindings, and each key in the list will be bound to the corresponding commands. An error is raised when trying to empty the exit list. (defalias 'win-switch-custom-set-keys #[(key-sym key-list) " \236A\211\204\306\307\"\210 \204\310=\203\306\311!\210J\312\211\203@ @\n\313\f\"=\2039\314\f\315#\210 A\211\204%*\316 !\210 L\210 \312\211\203e @\314\n#\210 A\211\204R+\317! \207" [key-sym win-switch-commands cmd key-list oldkey --dolist-tail-- error "Symbol %s is not a valid win-switch key list" win-switch-exit-keys "The exit keys list for win-switch must remain non-empty" nil lookup-key define-key win-switch-exit-and-redo win-switch-clear-from-keylists win-switch--fix-keymap-defaults win-switch-map newkey] 5 (#$ . 27375)]) #@295 Convert abbreviated command name to a key list symbol. NAME can be either a symbol or a string, and can be either a full name of the form win-switch--keys or just the component, where for example is up, down, and so forth. Returns the associated win-switch--keys symbol. (defalias 'win-switch-name-to-command-sym #[(name) ";\203 \202\f\304!9\203\202\305!\306\n \"\203%\n\202+\305\307\310 \"!*\207" [name name-str name-sym win-switch-commands symbol-name intern assoc format "win-switch-%s-keys"] 4 (#$ . 28786)]) #@576 Bind specified keys to a command and adjust `win-switch-map'. KEY-LIST is a list of keys, each acceptable to `define-key'. NAME is either a string or a symbol, either of the form win-switch--keys or just , where is one of `up', `down', `left', `right', `next-window', `previous-window', `enlarge-vertically', `shrink-vertically', `enlarge-horizontally', `shrink-horizontally', `other-frame', `exit', `split-vertically', `split-horizontally', `delete-window', or `emergency-exit'. (Specifically, it must be on of the keys in the alist `win-switch-commands'.) (defalias 'win-switch-set-keys #[(key-list name) "\302\303! \"\207" [name key-list win-switch-custom-set-keys win-switch-name-to-command-sym] 3 (#$ . 29345) "XList of Key Sequences: \nSSet to win-switch command name: "]) #@200 Add KEY to command list associated with NAME. KEY is a key binding in any form acceptable to `define-key'. NAME should be a symbol or string for which the variable `win-switch-NAME-keys' is defined. (defalias 'win-switch-add-key #[(key name) "\306!\307 \n\"A\211\205 J \204\310\311\"\210 \f\235\203%\f\210\2027\312 #\210\313 C!\210 \fBL\210+\314 !\211 \207" [name sym win-switch-commands cmd lst key win-switch-name-to-command-sym assoc error "%s is not a valid win-switch key type" define-key win-switch-clear-from-keylists win-switch--fix-keymap-defaults win-switch-map] 5 (#$ . 30149) "KKey sequence: \nSAdd key %s to win-switch command name: "]) #@305 Remove KEY from command list associated with NAME. NAME should be a symbol or string for which the variable `win-switch-NAME-keys' is defined. KEY is a key binding in any form acceptable to `define-key'. Removing the last exit key raises an error, and the last of any other key prompts an alert message. (defalias 'win-switch-delete-key #[(key name) "\306!\307 \n\"A\211\205 J \204\310\311\"\210 \f\235\204&\310\312 #\210\fA\204=\313=\2038\310\314!\210\202=\315\316\"\210\317 \320#\210 \321 \f\"L\210\322!\211+\207" [name sym win-switch-commands cmd lst key win-switch-name-to-command-sym assoc error "%s is not a valid win-switch key type" "Key %s is not associated with command %s" exit "The exit keys list for win-switch must remain non-empty" message "Removing last key from command list win-switch-%s-keys" define-key win-switch-exit-and-redo delete win-switch--fix-keymap-defaults win-switch-map] 5 (#$ . 30823) "KKey sequence: \nSDelete key %s from win-switch command name: "]) #@356 Safely bind KEY to DEF in win-switch keymap. Attempting to bind the last exit key raises an error. KEY and DEF are a keybinding and definition, respectively, as would be acceptable to `define-key'. If DEF is a keymap, ensure that keymap (and all sub-keymaps) have an exit-inducing default (`win-switch-exit-and-redo'), unless FORCE-NO-DEFAULT is non-nil. (defalias 'win-switch-define-key #[(key def &optional force-no-default) "A\204 \235\203\n\305=\204\306\307!\210\310 C!\210\311 \n#\210\f?\205*\312 !\211\207" [win-switch-exit-keys key def win-switch-map force-no-default win-switch-exit error "The exit keys list for win-switch must remain non-empty" win-switch-clear-from-keylists define-key win-switch--fix-keymap-defaults] 4 (#$ . 31837) "KKey sequence: \nCSet key %s to command: "]) #@374 Bind specified keys to a once-only command and adjust `win-switch-once-map'. KEY-LIST is a list of keys, each acceptable to `define-key'. NAME is either a string or a symbol, either of the form win-switch-once--keys or just , where is one of `double-next' or `double-prev'. (Specifically, it must be on of the keys in the alist `win-switch-once-commands'.) (defalias 'win-switch-set-once-keys #[(key-list name) ";\203 \202\f\306!9\203\202\307!\310 \f\311#\312\n \"\2060\312\307\313\314 \"! \"\211@A\211\204D\315\316\"\210\317=\206O\320=?\205\240J\311\211\203u@\321\311#\210A\211\204_*L\210\311\211\205\237@\321#\210A\211\204\207\311*.\207" [name name-str name-sym win-switch-commands win-switch-once-commands cmd-list symbol-name intern append nil assoc format "win-switch-%s-keys" error "%s is not a valid win-switch-once-command" win-switch-exit-keys win-switch-emergency-exit-keys define-key cmdpair keysym cmd key --dolist-tail-- win-switch-once-map key-list] 6 (#$ . 32646) "XList of Key Sequences: \nSSet to win-switch-once command name: "]) #@310 Toggle or set window wrapping behavior. When WRAP is nil, toggle setting of `win-switch-wrap-around'. Otherwise, WRAP should be an integer, negative to turn off wrapping and non-negative to turn it on. (Value t also turns it on for convenience.) This function synchronizes `windmove-wrap-around' accordingly. (defalias 'win-switch-set-wrap-around #[(&optional wrap) "\250\203\303W?\205\304\202\304=\203\304\202 ?\211\211\207" [wrap win-switch-wrap-around windmove-wrap-around 0 t] 3 (#$ . 33796) "p"]) #@1271 Enter window switching mode, or select next window in the frame. If the variable `win-switch-other-window-first' is non-nil, then `win-switch-next-window' is called *before* entering window switching mode. The variable `win-switch-window-threshold' determines both the switching behavior and how this function interprets its argument. * When `win-switch-window-threshold' is less than or equal to 0, window switching mode is always entered and the argument MUST-ENTER-OR-PREFIX is interpreted as a raw format prefix argument for any calls to `win-switch-next-window'. This only matters if `win-switch-other-window-first' is (or returns) a non-nil value. * When `win-switch-window-threshold' is greater than 0, entry to window switching mode occurs if either the number of windows in the current frame is above `win-switch-window-threshold' or if the prefix argument (MUST-ENTER-OR-PREFIX) is non-nil. Any calls to `win-switch-next-window' determined by the configuration are still made, and they are given nil as an argument. If window switching mode is not entered, `win-switch-next-window' is called. While more complicated than ideal, this dichotomy gives maximum flexibility for several common use cases. (defalias 'win-switch-dispatch #[(&optional must-enter-or-prefix) "\306!\211?\205\n\206\307 \f\310X\205\n \301=\204< \2034\311 !\2030 \2021\312\2048 \204<\313 !\210 \205B\314 +\207" [win-switch-abort-hook abort must-enter-or-prefix enter win-switch-window-threshold arg run-hook-with-args-until-success win-switch--enough-windows-p 0 functionp t win-switch-next-window win-switch-enter win-switch-other-window-first] 3 (#$ . 34321) "P"]) (defalias 'win-switch-mode 'win-switch-dispatch) #@383 Produce a command to execute COMMAND and then `win-switch-dispatch'. COMMAND can be a (quoted) symbol, a lambda form, or a variable bound to a function. FORCE-ENTER, if non-nil, forces `win-switch-dispatch' to enter window switching mode. Note that the call to COMMAND replaces any automatic calls to `win-switch-next-window' or `win-switch-other-window-function' during dispatch. (defalias 'win-switch-dispatch-with '(macro . #[(command &optional force-enter) "\302\303\304\305\306\307D \205\310CBB\311BBF\207" [command force-enter lambda (&optional arg) (interactive "P") let (win-switch-other-window-first t) win-switch-other-window-function (win-switch-window-threshold 0) ((win-switch-dispatch arg))] 7 (#$ . 36106)])) #@561 Prefix command to execute one window-switching operation. This command does not enter window-switching mode, nor does it require an exit. Except for the exit commands, which are excluded, the commands and keys are shared with `win-switch-dispatch'. In addition, this includes commands to move forward and backward by two windows. See `win-shift-once-double-next-keys' and `win-shift-once-double-prev-keys' for the associated keys. Taken together, these bindings make it convenient to use a single key sequence to navigate conveniently with up to five windows. (defalias 'win-switch-dispatch-once #[(&optional arg) "\303\304\305\"\306 \"\211\203\307\n!\202\310\311\312\313 !\"*\207" [keys win-switch-once-map cmd read-key-sequence-vector nil t lookup-key call-interactively message "%s is undefined" key-description this-command-keys-vector] 5 (#$ . 36841) "P"]) #@68 Eliminate window-splitting and deleting keys from win-switch mode. (defalias 'win-switch-remove-split-and-delete-keys #[nil "\300\301\302\"\210\300\301\303\"\210\300\301\304\"\207" [win-switch-set-keys nil split-horizontally split-vertically delete-window] 3 (#$ . 37716)]) #@328 Restore default key commands and bind global dispatch keys. Under this setup, keys i, j, k, and l will switch windows, respectively, up, left, down, and right, with other functionality bound to nearby keys. The arguments DISPATCH-KEYS, if non-nil, should be a list of keys that will be bound globally to `win-switch-dispatch'. (defalias 'win-switch-setup-keys-ijkl #[(&rest dispatch-keys) "\303\304\305\"\210\303\306\307\"\210\303\310\311\"\210\303\312\313\"\210\303\314\315\"\210\303\316\317\"\210\303\320\321\"\210\303\322\323\"\210\303\324\325\"\210\303\326\327\"\210\303\330\331\"\210\303\332\333\"\210\303\334\335\"\210\303\336\337\"\210\303\340\341\"\210\303\342\343\"\210\344\211\205h\n@\345 \346\"\210\nA\211\204X\344*\207" [dispatch-keys key --dolist-tail-- win-switch-set-keys ("i") up ("k") down ("j") left ("l") right ("o") next-window ("p") previous-window ("I") enlarge-vertically ("K") shrink-vertically ("J") shrink-horizontally ("L") enlarge-horizontally (" ") other-frame ("u" [return]) exit (";") split-horizontally ("h") split-vertically ("0") delete-window ("\207") emergency-exit nil global-set-key win-switch-dispatch] 4 (#$ . 37997) nil]) #@392 Restore default key commands and bind global dispatch keys. Split and delete keys are excluded from the map for simplicity. Under this setup, keys i, j, k, and l will switch windows, respectively, up, left, down, and right, with other functionality bound to nearby keys. The arguments DISPATCH-KEYS, if non-nil, should be a list of keys that will be bound globally to `win-switch-dispatch'. (defalias 'win-switch-setup-keys-ijkl-minimal #[(&rest dispatch-keys) "\301\302\"\210\303 \207" [dispatch-keys apply win-switch-setup-keys-ijkl win-switch-remove-split-and-delete-keys] 3 (#$ . 39174) nil]) (defalias 'win-switch-setup-keys-default 'win-switch-setup-keys-ijkl) #@596 Set arrow keys as both dispatch and direction control. Under this setup, pressing an arrow key with MODIFIER does a window switch in the corresponding direction and then calls `win-switch-dispatch'. When window-switching mode is engaged, the arrow keys continue to switch windows in the corresponding direction, with all the other functionality bound to nearby keys. MODIFIER is a symbol, one of control, meta, alt, hyper, super but *not* shift, which is used for enlarging. The arguments DISPATCH-KEYS, if non-nil, should be a list of keys that will be bound globally to `win-switch-dispatch'. (defalias 'win-switch-setup-keys-arrows #[(modifier &rest dispatch-keys) "\304=\203\n\305\306!\210\307\310\311\"\210\307\312\313\"\210\307\314\315\"\210\307\316\317\"\210\307\320\321\"\210\307\322\323\"\210\307\324\325\"\210\307\326\327\"\210\307\330\331\"\210\307\332\333\"\210\307\334\335\"\210\307\336\337\"\210\307\340\341\"\210\307\342\343\"\210\307\344\345\"\210\307\346\347\"\210 \350\211\203q @\351\n\352\"\210 A\211\204b*\351\353\311D!\354\"\210\351\353\313D!\355\"\210\351\353\315D!\356\"\210\351\353\317D!\357\"\207" [modifier dispatch-keys key --dolist-tail-- shift error "The shift modifier cannot be used for dispatch" win-switch-set-keys ([up]) up ([down]) down ([left]) left ([right]) right ("/") next-window (".") previous-window ([(shift up)]) enlarge-vertically ([(shift down)]) shrink-vertically ([(shift left)]) shrink-horizontally ([(shift right)]) enlarge-horizontally (" ") other-frame ([return]) exit (";") split-horizontally ("'") split-vertically ("l") delete-window ("\207") emergency-exit nil global-set-key win-switch-dispatch vector #[#1=(&optional arg) "\303\304\305\n!*\207" [win-switch-other-window-function win-switch-other-window-first arg t win-switch-up win-switch-dispatch] 2 nil #2="P"] #[#1# "\303\304\305\n!*\207" [win-switch-other-window-function win-switch-other-window-first arg t win-switch-down win-switch-dispatch] 2 nil #2#] #[#1# "\303\304\305\n!*\207" [win-switch-other-window-function win-switch-other-window-first arg t win-switch-left win-switch-dispatch] 2 nil #2#] #[#1# "\303\304\305\n!*\207" [win-switch-other-window-function win-switch-other-window-first arg t win-switch-right win-switch-dispatch] 2 nil #2#]] 5 (#$ . 39849) "SModifier symbol: "]) #@479 Set arrow keys as both dispatch (w/control modifer) and direction. With a control modifier, Each arrow key causes a window switch in the corresponding direction and engages window-switching mode if the configuration parameters indicate so. When window-switching mode is engaged, the arrow keys theh continue to switch windows in the corresponding direction. The arguments DISPATCH-KEYS, if non-nil, should be a list of keys that will be bound globally to `win-switch-dispatch'. (defalias 'win-switch-setup-keys-arrow-ctrl #[(&rest dispatch-keys) "\301\302\303B\"\207" [dispatch-keys apply win-switch-setup-keys-arrows control] 4 (#$ . 42179) nil]) #@473 Set arrow keys as both dispatch (w/meta modifer) and direction. With a meta modifier, Each arrow key causes a window switch in the corresponding direction and engages window-switching mode if the configuration parameters indicate so. When window-switching mode is engaged, the arrow keys theh continue to switch windows in the corresponding direction. The arguments DISPATCH-KEYS, if non-nil, should be a list of keys that will be bound globally to `win-switch-dispatch'. (defalias 'win-switch-setup-keys-arrow-meta #[(&rest dispatch-keys) "\301\302\303B\"\207" [dispatch-keys apply win-switch-setup-keys-arrows meta] 4 (#$ . 42835) nil]) #@339 Set left-handed keys mirroring defaults and bind global dispatch keys. Under this setup, keys e, s, d, and f will switch windows, respectively, up, left, down, and right, with other functionality bound to nearby keys. The arguments DISPATCH-KEYS, if non-nil, should be a list of keys that will be bound globally to `win-switch-dispatch'. (defalias 'win-switch-setup-keys-esdf #[(&rest dispatch-keys) "\303\304\305\"\210\303\306\307\"\210\303\310\311\"\210\303\312\313\"\210\303\314\315\"\210\303\316\317\"\210\303\320\321\"\210\303\322\323\"\210\303\324\325\"\210\303\326\327\"\210\303\330\331\"\210\303\332\333\"\210\303\334\335\"\210\303\336\337\"\210\303\340\341\"\210\303\342\343\"\210\344\211\205h\n@\345 \346\"\210\nA\211\204X\344*\207" [dispatch-keys key --dolist-tail-- win-switch-set-keys ("e") up ("d") down ("s") left ("f") right ("w") next-window ("q") previous-window ("E") enlarge-vertically ("D") shrink-vertically ("S") shrink-horizontally ("F") enlarge-horizontally (" ") other-frame ("r" [return]) exit ("3") split-horizontally ("2") split-vertically ("4") delete-window ("\207") emergency-exit nil global-set-key win-switch-dispatch] 4 (#$ . 43482) nil]) #@70 Win-switch configuration previously preferred by the package author. (defalias 'win-switch-authors-configuration #[nil "\306\307\310\311\312\313\314\211\314\315\316!\210\317\320\321\"\207" [win-switch-idle-time win-switch-window-threshold win-switch-other-window-first win-switch-provide-visual-feedback win-switch-feedback-background-color win-switch-feedback-foreground-color 0.7 2 #[nil "\300\301 \233?\207" [3 window-list] 2] t "red" "white" nil win-switch-set-wrap-around 1 win-switch-setup-keys-ijkl "o" "" win-switch-on-feedback-function win-switch-off-feedback-function win-switch-other-window-function] 4 (#$ . 44669) nil]) #@69 Win-switch configuration currently preferred by the package author. (defalias 'win-switch-authors-new-configuration #[nil "\306\307\310\311\312\313\310\211\310\314\307!\210\315\316\317\"\207" [win-switch-idle-time win-switch-window-threshold win-switch-other-window-first win-switch-provide-visual-feedback win-switch-feedback-background-color win-switch-feedback-foreground-color 0.7 1 nil t "red" "white" win-switch-set-wrap-around win-switch-setup-keys-ijkl "o" "" win-switch-on-feedback-function win-switch-off-feedback-function win-switch-other-window-function] 4 (#$ . 45323) nil]) (byte-code "\300\301!\210\302\303!\207" [run-hooks win-switch-load-hook provide win-switch] 2)