;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. #@29 The winring version number. (defconst winring-version "5.1" (#$ . 87)) (byte-code "\300\301!\210\302\303\304\305\306\307\310\311&\210\312\313\314\315\316\317\310\303&\210\312\320\321\322\316\323\310\303&\210\312\324\325\326\316\327\310\303&\210\312\330\304\331\316\332\310\303&\210\312\333\334\335\316\336\310\303&\207" [require ring custom-declare-group winring nil "Window configuration rings" :prefix "winring-" :group frames custom-declare-variable winring-ring-size 7 "*Size of the window configuration ring." :type integer winring-prompt-on-create 'usually "*When true, prompt for new configuration name on creation.\nIf not t and not nil, prompt for configuration name on creation,\nexcept when creating the initial configuration on a new frame." (radio (const :tag "Never prompt for configuration name" nil) (const :tag "Always prompt for configuration name" t) (const :tag "Prompt for all but initial configuration name" usually)) winring-new-config-buffer-name "*scratch*" "*Name of the buffer to switch to when a new configuration is created." string winring-show-names "*If non-nil, window configuration names are shown in the modeline.\nIf nil, the name is echoed in the minibuffer when switching window\nconfigurations." boolean winring-name-generator 'winring-next-name "*Function that generates new automatic window configuration names.\nWhen a new window configuration is created with `winring-new-configuration',\nand the user did not specify an explicit name, this function is called with\nno arguments to get the new name. It must return a string." function] 8) #@143 *Prefix key that the `winring-map' is placed on in the global keymap. If you change this, you must do it before calling `winring-initialize'. (defvar winring-keymap-prefix "7" (#$ . -1683)) #@54 Keymap used for winring, window configuration rings. (defvar winring-map nil (#$ . 1880)) (byte-code "\204=\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\301\207" [winring-map make-sparse-keymap define-key "b" winring-submit-bug-report "n" winring-new-configuration "2" winring-duplicate-configuration "j" winring-jump-to-configuration "0" winring-delete-configuration "o" winring-next-configuration "p" winring-prev-configuration "r" winring-rename-configuration "v" winring-version] 4) #@72 Index used as a sequence number for new unnamed window configurations. (defvar winring-name-index 1 (#$ . 2498)) #@57 History variable for window configuration name prompts. (defvar winring-name-history nil (#$ . 2617)) #@37 How to generate a new winring name. (defalias 'winring-next-name #[nil "\302\303\"T )\207" [winring-name-index name format "%03d"] 3 (#$ . 2725)]) #@20 Create a new ring. (defalias 'winring-new-ring #[nil "\301!\207" [winring-ring-size make-ring] 2 (#$ . 2882)]) #@44 Add to the given FRAME a new winring RING. (defalias 'winring-set-frame-ring #[(frame ring) "\302\303 BC\"\207" [frame ring modify-frame-parameters winring-ring] 4 (#$ . 3000)]) #@44 Get the winring ring from the given FRAME. (defalias 'winring-get-frame-ring #[(frame) "\301\302\"\207" [frame frame-parameter winring-ring] 3 (#$ . 3185)]) #@57 Generate the name, but specify the newly created FRAME. (defalias 'winring-create-frame-hook #[(frame) "\302\303=\205\f\304\305\306\307# \"\207" [winring-prompt-on-create frame winring-set-name t read-string "Initial window configuration name? " nil winring-name-history] 5 (#$ . 3349)]) #@154 Clear everything when Emacs exits. Desktop save modes can save frame parameters, but the winring-ring parameter if saved will contain bogus data. (defalias 'winring-cleanup-hook #[nil "\302 \303\211\205 @\304\305 \"\210 A\211\204 \303*\207" [frame --dolist-tail-- frame-list nil winring-set-frame-ring winring-new-ring] 4 (#$ . 3646)]) #@279 Set the window configuration name. Optional NAME is the name to use; if not given, then `winring-name-generator' is `funcall'd with no arguments to get the generated name. Optional FRAME is the frame to set the name for; if not given then the currently selected frame is used. (defalias 'winring-set-name #[(&optional name frame) "\206 \n\206\f\304 \305\n\306BC\"\210* ?\205 \307\310\"\207" [name winring-name-generator frame winring-show-names selected-frame modify-frame-parameters winring-name message "Switching to window configuration: %s"] 4 (#$ . 4004)]) #@45 Get the winring ring for the current frame. (defalias 'winring-get-ring #[nil "\302 \303!\211\204\304 \305 \"\210 *\207" [frame ring selected-frame winring-get-frame-ring winring-new-ring winring-set-frame-ring] 4 (#$ . 4583)]) #@37 Get the name of the current CONFIG. (defalias 'winring-name-of #[(config) "@\207" [config] 1 (#$ . 4824)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put winring-name-of speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@46 Get the configuration of the current CONFIG. (defalias 'winring-conf-of #[(config) "A@\207" [config] 1 (#$ . 5079)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put winring-conf-of speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@38 Get the point of the current CONFIG. (defalias 'winring-point-of #[(config) "\3018\207" [config 2] 2 (#$ . 5344)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put winring-point-of speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@153 Get the current winring name. In Emacs, just use the variable's string value directly, since the `displayed' value is kept as a frame parameter. (defalias 'winring-name-of-current #[nil "\300\301\302\"\207" [frame-parameter nil winring-name] 3 (#$ . 5609)]) #@95 Save the current winring configuration. With AT-FRONT, save this at the front of the ring. (defalias 'winring-save-current-configuration #[(&optional at-front) "\305 \306 ` \307 \nE\f\203\310 \"\202\311 \",\207" [ring name here conf at-front winring-get-ring winring-name-of-current current-window-configuration ring-insert-at-beginning ring-insert] 3 (#$ . 5880)]) #@69 Restore the winring configuration. ITEM is the thing to restore. (defalias 'winring-restore-configuration #[(item) "\211A@)\211@)\305 8)\306\f!\210\nb\210\307 !\210+\310 \207" [item config here name conf 2 set-window-configuration winring-set-name force-mode-line-update] 5 (#$ . 6265)]) #@32 Get the complete winring name. (defalias 'winring-complete-name #[nil "\306 \307!S\310 \211\311BC\312\313 X\203+\314 \"\211@) B B S\202\315\316\317\n\" \312\320\312\321&\211\322\230\203@\n\323\f \"A-\207" [ring n current table name config winring-get-ring ring-length winring-name-of-current -1 nil 0 ring-ref completing-read format "Window configuration name (%s): " must winring-name-history "" assoc] 8 (#$ . 6571)]) #@37 PROMPT for the winring name to use. (defalias 'winring-read-name #[(prompt) "\306 \307!S\310 C\311\312 X\203%\313 \"\211@)\nB S\202\314 \311\315#\211\n\235\2036\316\317 \"\210 ,\207" [ring n table name config prompt winring-get-ring ring-length winring-name-of-current nil 0 ring-ref read-string winring-name-history error "Window configuration name already in use: %s"] 5 (#$ . 7014)]) #@342 Save the current window configuration and create an empty new one. The buffer shown in the new empty configuration is defined by `winring-new-config-buffer-name'. With \[universal-argument] ARG, prompt for the new configuration's name. Otherwise, the function in `winring-name-generator' will be called to get the new configuration's name. (defalias 'winring-new-configuration #[(&optional arg) "\204 \205 \305\306!\211\307\230\203 \310 \210\311 \210\312\f!\210\313\n!)\207" [arg winring-prompt-on-create name winring-name-generator winring-new-config-buffer-name winring-read-name "New window configuration name? " "" winring-save-current-configuration delete-other-windows switch-to-buffer winring-set-name] 3 (#$ . 7422) "P"]) #@247 Push the current window configuration on the ring, and duplicate it. With \[universal-argument] ARG prompt for the new configuration's name. Otherwise, the function in `winring-name-generator' will be called to get the new configuration's name. (defalias 'winring-duplicate-configuration #[(&optional arg) "\204 \205 \304\305!\211\306\230\203 \307 \210\310\n!)\207" [arg winring-prompt-on-create name winring-name-generator winring-read-name "New window configuration name? " "" winring-save-current-configuration winring-set-name] 3 (#$ . 8169) "P"]) #@57 Switch to the next window configuration for this frame. (defalias 'winring-next-configuration #[nil "\301\302 !\303 \210\304!)\207" [next ring-remove winring-get-ring winring-save-current-configuration winring-restore-configuration] 2 (#$ . 8737) nil]) #@61 Switch to the previous window configuration for this frame. (defalias 'winring-prev-configuration #[nil "\301\302 \303\"\304\305!\210\306!)\207" [prev ring-remove winring-get-ring 0 winring-save-current-configuration at-front winring-restore-configuration] 3 (#$ . 8998) nil]) #@39 Go to the named window configuration. (defalias 'winring-jump-to-configuration #[nil "\303 \304 \305\306 X\205\307 \"\310 \210\311\n!+\207" [ring index item winring-get-ring winring-complete-name nil 0 ring-remove winring-save-current-configuration winring-restore-configuration] 3 (#$ . 9283) nil]) #@135 Delete the current configuration and switch to the next one. With \[universal-argument] ARG prompt for named configuration to delete. (defalias 'winring-delete-configuration #[(&optional arg) "\303 \304\n\203\305\306 \211V\203\307\310 !!\202\310 \"*\207" [index ring arg winring-get-ring nil 0 winring-complete-name winring-restore-configuration ring-remove] 3 (#$ . 9597) "P"]) #@43 Rename the current configuration to NAME. (defalias 'winring-rename-configuration #[nil "\300\301\302!!\207" [winring-set-name winring-read-name "New window configuration name? "] 3 (#$ . 9992) nil]) #@43 Address accepting bug report submissions. (defconst winring-help-address "barry@python.org" (#$ . 10198)) #@56 Echo the current version of winring in the minibuffer. (defalias 'winring-version #[nil "\301\302\"\207" [winring-version message "Using winring version %s"] 3 (#$ . 10310) nil]) #@110 Submit via mail a bug report on winring. With \[universal-argument] COMMENT-P just send any type of comment. (defalias 'winring-submit-bug-report #[(comment-p) "\203\304\202 \305\306\307!\210\310\n\311 P?\205\312\313\211\314&\210?\205-\315`!\210\316c\210\317 )\207" [comment-p reporter-prompt-for-summary-p winring-help-address winring-version "(Very) brief summary: " t require reporter reporter-submit-bug-report "winring " (winring-ring-size winring-new-config-buffer-name winring-show-names winring-name-generator winring-keymap-prefix) nil "Dear Barry," set-mark "Please replace this text with a description of your problem.\nThe more accurately and succinctly you can describe the\nproblem you are encountering, the more likely I can fix it\nin a timely way.\n\n" exchange-point-and-mark] 7 (#$ . 10497) (list (not (y-or-n-p "Is this a bug report (hit `n' to send other comments)? ")))]) #@124 Create the variable to hold the window configuration name. Use HACK-MODELINE-FUNCTION to override the default behavior. (defalias 'winring-initialize #[(&optional hack-modeline-function) "\306\307\310\307#\210\203 \210\202\311 A \240\210*\312\313\314\"\210\312\315\316\"\210\314\317 !\210\320\f \"\207" [hack-modeline-function mode-line-format tail winring winring-keymap-prefix winring-map set-frame-parameter nil winring-name (:eval (when winring-show-names (concat "<" (winring-name-of-current) "> "))) add-hook after-make-frame-functions winring-create-frame-hook kill-emacs-hook winring-cleanup-hook selected-frame global-set-key] 4 (#$ . 11409)]) (provide 'winring)