;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\301B\302\303\304\305\306\307%\210\310\311\312\313\306\303\314\315&\210\310\316\304\317\306\303\314\320&\210\310\321\304\322\306\303\314\323&\207" [debug-ignored-errors "^No window numbered .$" custom-declare-group window-numbering nil "Numbered window shortcuts" :group convenience custom-declare-variable window-numbering-auto-assign-0-to-minibuffer t "*If non-nil, `window-numbering-mode' assigns 0 to the minibuffer if active." :type (choice (const :tag "Off" nil) (const :tag "On" t)) window-numbering-before-hook "*Hook called before `window-numbering-mode' starts assigning numbers.\nThe number of windows that will be numbered is passed as a parameter.\nUse `window-numbering-assign' to manually assign some of them a number.\nIf you want to assign a number to just one buffer, use\n`window-numbering-assign-func' instead." hook window-numbering-assign-func "*Function called for each window by `window-numbering-mode'.\nThis is called before automatic assignment begins. The function should\nreturn a number to have it assigned to the current-window, nil otherwise." function] 8) #@76 The position in the mode-line `window-numbering-mode' displays the number. (defconst window-numbering-mode-line-position 1 (#$ . 1194)) (custom-declare-face 'window-numbering-face nil "Face used for the number in the mode-line." :group 'window-numbering) #@125 Select window given number I by `window-numbering-mode'. If prefix ARG is given, delete the window instead of selecting it. (defalias 'select-window-by-number #[(i &optional arg) "\305\306 \"@\307 \310Y\203- \311W\203-\n H\211\203-\f\203'\312 !\2021\313 !\2021\314\315 \"*\207" [window-numbering-table window windows i arg gethash selected-frame nil 0 10 delete-window select-window error "No window numbered %s"] 3 (#$ . 1456) "P"]) (byte-code "\302\303 W\203(\304\305\306\307\310\"!\311\307\312\"\313\314\315BB\257!\210T\211\202*\302\207" [i --dotimes-limit-- 10 0 eval defun intern format "select-window-%s" (&optional arg) "Select the window with number %i." (interactive "P") select-window-by-number (arg)] 10) #@41 table -> (window vector . number table) (defvar window-numbering-table nil (#$ . 2200)) (defalias 'window-numbering-calculate-left #[(windows) "\304\305\211\306Y\203!\n H\211\204 T\307\246B) S\211\202*\207" [left i windows window 9 nil 0 10] 3]) #@46 A vector listing the window for each number. (defvar window-numbering-windows nil (#$ . 2464)) (defvar window-numbering-numbers "A hash map containing each window's number.") (defvar window-numbering-left "A list of unused window numbers.") (defalias 'window-numbering-assign #[(window &optional number) "\203. H\203\306\307\n H$\210\310\207  \f\nI\210*\311\n #\210\312\"\313\207\205F\314\n \"?\205F@\315\n\"\210)\207" [number window-numbering-windows window #1=#:v #2=#:v window-numbering-numbers message "Number %s assigned to two buffers (%s and %s)" nil puthash delq t gethash window-numbering-assign window-numbering-left] 6]) #@145 Update the window numbering for the current frame. Optional parameter PREASSIGNED-WINDOWS is a hashmap already mapping some windows to numbers. (defalias 'window-numbering-update #[nil "\306\307\310\"\311\312\307\"\313!\314\315  B #\210\f\203&\316 \203&\317\316 \320\"\210\321\310\320\322 #\323\324 \"\210 \203O\325\326\327\330\331\332\333\334\335\336 DDC\337BBEEE \"\210 \310\211!\205m!@\317!\210!A\211!\204Y\310+\207" [window-numbering-windows window-numbering-numbers window-numbering-left window-numbering-table window-numbering-auto-assign-0-to-minibuffer windows make-vector 10 nil make-hash-table :size window-numbering-calculate-left puthash selected-frame active-minibuffer-window window-numbering-assign 0 window-list frame-first-window run-hook-with-args window-numbering-before-hook mapc lambda (window) with-selected-window window with-current-buffer (window-buffer window) let num funcall ((when num (window-numbering-assign window num))) window-numbering-assign-func --dolist-tail--] 12 (#$ . 3128)]) (defalias 'window-numbering-get-number-string #[(&optional window) "\302\303!!\304 \305\306#)\207" [window s int-to-string window-numbering-get-number propertize face window-numbering-face] 4]) (defalias 'window-numbering-get-number #[(&optional window) "\302\206\303 \302\304 \"A\"\207" [window window-numbering-table gethash selected-window selected-frame] 5]) #@44 Keymap used in by `window-numbering-mode'. (defvar window-numbering-keymap (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210\302\317\320#\210\302\321\322#\210\302\323\324#\210\302\325\326#\210)\207" [map make-sparse-keymap define-key "\260" select-window-0 "\261" select-window-1 "\262" select-window-2 "\263" select-window-3 "\264" select-window-4 "\265" select-window-5 "\266" select-window-6 "\267" select-window-7 "\270" select-window-8 "\271" select-window-9] 4) (#$ . 4542)) #@284 Non-nil if Window-Numbering mode is enabled. See the `window-numbering-mode' command for a description of this minor mode. Setting this variable directly does not take effect; either customize it (see the info node `Easy Customization') or call the function `window-numbering-mode'. (custom-declare-variable 'window-numbering-mode nil '(#$ . 5112) :set 'custom-set-minor-mode :initialize 'custom-initialize-default :type 'boolean) #@615 A minor mode that assigns a number to each window. This is a minor mode. If called interactively, toggle the `Window-Numbering mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `(default-value 'window-numbering-mode)'. The mode's hook is called both when the mode is enabled and when it is disabled. (defalias 'window-numbering-mode #[(&optional arg) "\306 \307\303 \310=\203\311\303!?\202\" \247\203! \312W\203!\313\202\"\314\"\210\315\302!\2039\316\303\n\"\311\303!\2039\303\nB \203q\f\204{\212\317\320\321\"\322 \210\323\324\325\"\210\326 \313\211'\203m'@\327 !\210\325 \210'A\211'\204Y+\202{\330 \210\331\324\325\"\210\313\332\333\311\303!\203\207\334\202\210\335\"\210\336\337!\203\265\340\303!\210\306 \203\240\306 \232\203\265\341(\342\343\311\303!\203\257\344\202\260\345(#\210))\346 \210\311\303!\207" [#1=#:last-message arg global-minor-modes window-numbering-mode window-numbering-table frame current-message set-default toggle default-value 1 nil t boundp delq make-hash-table :size 16 window-numbering-install-mode-line add-hook window-configuration-change-hook window-numbering-update frame-list select-frame window-numbering-clear-mode-line remove-hook run-hooks window-numbering-mode-hook window-numbering-mode-on-hook window-numbering-mode-off-hook called-interactively-p any customize-mark-as-set "" message "Window-Numbering mode %sabled%s" "en" "dis" force-mode-line-update --dolist-tail-- local] 5 (#$ . 5550) (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 'toggle))]) (defvar window-numbering-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\310\211%\207" [window-numbering-keymap window-numbering-mode-hook variable-documentation put "Hook run after entering or leaving `window-numbering-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode window-numbering-mode] 6) #@74 Install the window number from `window-numbering-mode' to the mode-line. (defalias 'window-numbering-install-mode-line #[(&optional position) "\306\307!\310\n\206 G^\311\f W\203( @B \210 A\fT\211\202*\312B \203? @B \210 A\211\2041\313\307\237\"\210*\314\315!\207" [res mode-line position window-numbering-mode-line-position i --dotimes-limit-- default-value mode-line-format nil 0 (:eval (window-numbering-get-number-string)) set-default force-mode-line-update t] 4 (#$ . 7923)]) #@73 Remove the window number of `window-numbering-mode' from the mode-line. (defalias 'window-numbering-clear-mode-line #[nil "\303\304!\305\211\203! @\211\306\232\204\nB) \210 A\211\204\n\307\304\237\"\210*\310\311!\207" [res mode-line item default-value mode-line-format nil (:eval (window-numbering-get-number-string)) set-default force-mode-line-update t] 4 (#$ . 8431)]) (provide 'window-numbering)