;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\207" [require window-purpose dired ibuffer ibuf-ext imenu-list] 2) #@154 Window layout for purpose-x-code1-dired-ibuffer. Has a main 'edit window, and two side windows - 'dired and 'buffers. All windows are purpose-dedicated. (defvar purpose-x-code1--window-layout '(nil (0 0 152 35) (t (0 0 29 35) (:purpose dired :purpose-dedicated t :width 0.16 :height 0.5 :edges (0.0 0.0 0.19333333333333333 0.5)) (:purpose buffers :purpose-dedicated t :width 0.16 :height 0.4722222222222222 :edges (0.0 0.5 0.19333333333333333 0.9722222222222222))) (:purpose edit :purpose-dedicated t :width 0.6 :height 0.9722222222222222 :edges (0.19333333333333333 0.0 0.8266666666666667 0.9722222222222222)) (:purpose ilist :purpose-dedicated t :width 0.15333333333333332 :height 0.9722222222222222 :edges (0.8266666666666667 0.0 1.0133333333333334 0.9722222222222222))) (#$ . 229)) (defvar purpose-x-code1-purpose-config (purpose-conf "purpose-x-code1" :mode-purposes '((ibuffer-mode . buffers) (dired-mode . dired) (imenu-list-major-mode . ilist)))) #@61 Internal variable for use with `frame-or-buffer-changed-p'. (defvar purpose-x-code1-buffers-changed nil (#$ . 1190)) #@63 Display only buffers that are bound to files. (fn QUALIFIER) (defalias 'ibuffer-filter-by-purpose-x-code1-ibuffer-files-only #[257 "\300B\301!\204\302\303\"\207\302\304\"\210\305\306\307\"\207" [purpose-x-code1-ibuffer-files-only ibuffer-push-filter message "Filter by nil already applied: %s" "Filter by nil added: %s" ibuffer-update nil t] 6 (#$ . 1313) (list nil)]) (byte-code "\301\302\303EB\302\207" [ibuffer-filtering-alist purpose-x-code1-ibuffer-files-only nil #[514 "\3001 \301!0\207\210\302 \210\303\207" [(error) buffer-file-name ibuffer-pop-filter nil] 4 "\n\n(fn BUF QUALIFIER)"]] 3) #@26 Set up ibuffer settings. (defalias 'purpose-x-code1--setup-ibuffer #[0 "\303\304\305\"\210\303\304\306\"\210\307\310\211\311\312!\203\313\312!\210\314 r\315\316\"\216\317 *\207" [ibuffer-formats ibuffer-display-summary ibuffer-use-header-line add-hook ibuffer-mode-hook #[0 "\300\301!\207" [ibuffer-filter-by-purpose-x-code1-ibuffer-files-only nil] 2] ibuffer-auto-mode ((mark " " name)) nil get-buffer "*Ibuffer*" kill-buffer internal--before-save-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-save-selected-window] 2] ibuffer-list-buffers] 5 (#$ . 1930)]) #@25 Unset ibuffer settings. (defalias 'purpose-x-code1--unset-ibuffer #[0 "\303\304\305\"\210\303\304\306\"\210\307\310\211\211\207" [ibuffer-formats ibuffer-display-summary ibuffer-use-header-line remove-hook ibuffer-mode-hook #[0 "\300\301!\207" [ibuffer-filter-by-purpose-x-code1-ibuffer-files-only nil] 2] ibuffer-auto-mode ((mark modified read-only " " (name 18 18 :left :elide) " " (size 9 -1 :right) " " (mode 16 16 :left :elide) " " filename-and-process) (mark " " (name 16 -1) " " filename)) t] 4 (#$ . 2523)]) #@295 Update free dired window with current buffer's directory. If a non-buffer-dedicated window with purpose 'dired exists, display the directory of the current buffer in that window, using `dired'. If there is no window available, do nothing. If current buffer doesn't have a filename, do nothing. (defalias 'purpose-x-code1-update-dired #[0 "\300 \2055\301\302\303\304!\"\2055\305 r\306\307\"\216\310\311\300 !!r\211q\210\312\313!\203)\313 \210)\314!\266\315p!*\262\207" [buffer-file-name cl-delete-if window-dedicated-p purpose-windows-with-purpose dired internal--before-save-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-save-selected-window] 2] dired-noselect file-name-directory fboundp dired-hide-details-mode display-buffer bury-buffer] 4 (#$ . 3049)]) #@142 Update auxiliary buffers if frame/buffer had changed. Uses `frame-or-buffer-changed-p' to determine whether the frame or buffer had changed. (defalias 'purpose-x-code1-update-changed #[0 "\300\301!\205 \302 \210\303 \207" [frame-or-buffer-changed-p purpose-x-code1-buffers-changed purpose-x-code1-update-dired imenu-list-update] 2 (#$ . 3843)]) #@407 Setup purpose-x-code1. This setup includes 4 windows: 1. dedicated 'edit window 2. dedicated 'dired window. This window shows the current buffer's directory in a special window, using `dired' and `dired-hide-details-mode' (if available). 3. dedicated 'buffers window. This window shows the currently open files, using `ibuffer'. 4. dedicated 'ilist window. This window shows the current buffer's imenu. (defalias 'purpose-x-code1-setup #[0 "\302\303\"\210\304 \210\305 \210\306 \210\307\310!\210\311\312\313\"\210\314 !\207" [purpose-x-code1-purpose-config purpose-x-code1--window-layout purpose-set-extension-configuration :purpose-x-code1 purpose-x-code1--setup-ibuffer purpose-x-code1-update-dired imenu-list-minor-mode frame-or-buffer-changed-p purpose-x-code1-buffers-changed add-hook post-command-hook purpose-x-code1-update-changed purpose-set-window-layout] 3 (#$ . 4196) nil]) #@24 Unset purpose-x-code1. (defalias 'purpose-x-code1-unset #[0 "\300\301!\210\302 \210\303\304!\210\305\306\307\"\207" [purpose-del-extension-configuration :purpose-x-code1 purpose-x-code1--unset-ibuffer imenu-list-minor-mode -1 remove-hook post-command-hook purpose-x-code1-update-changed] 3 (#$ . 5092) nil]) #@66 Configuration that gives each magit major mode the same purpose. (defvar purpose-x-magit-single-conf (purpose-conf "magit-single" :mode-purposes '((magit-mode . Magit))) (#$ . 5406)) #@65 Configuration that gives each magit major mode its own purpose. (defvar purpose-x-magit-multi-conf (purpose-conf "magit-multi" :mode-purposes '((magit-diff-mode . magit-diff) (magit-status-mode . magit-status) (magit-log-mode . magit-log) (magit-commit-mode . magit-commit) (magit-cherry-mode . magit-cherry) (magit-branch-manager-mode . magit-branch-manager) (magit-process-mode . magit-process) (magit-reflog-mode . magit-reflog) (magit-wazzup-mode . magit-wazzup))) (#$ . 5595)) #@169 Stores `magit-display-buffer-function'. The value of `magit-display-buffer-function' at the time `purpose-x-magit-single-on' or `purpose-x-magit-multi-on' is invoked. (defvar purpose-x-old-magit-display-buffer-function nil (#$ . 6084)) #@55 Integrate `magit' with `window-purpose'. (fn BUFFER) (defalias 'purpose-x-magit-display-buffer-function #[257 "\302 !)\207" [display-buffer-overriding-action purpose-x-old-magit-display-buffer-function (purpose--action-function)] 3 (#$ . 6327)]) #@45 Turn on magit-single purpose configuration. (defalias 'purpose-x-magit-single-on #[0 "\301\302\303\"\210\304\305\"\207" [purpose-x-magit-single-conf eval-after-load magit #[0 "\204 \302\211\207" [purpose-x-old-magit-display-buffer-function magit-display-buffer-function purpose-x-magit-display-buffer-function] 2] purpose-set-extension-configuration :magit] 3 (#$ . 6582) nil]) #@44 Turn on magit-multi purpose configuration. (defalias 'purpose-x-magit-multi-on #[0 "\301\302\303\"\210\304\305\"\207" [purpose-x-magit-multi-conf eval-after-load magit #[0 "\204 \302\211\207" [purpose-x-old-magit-display-buffer-function magit-display-buffer-function purpose-x-magit-display-buffer-function] 2] purpose-set-extension-configuration :magit] 3 (#$ . 6972) nil]) #@57 Turn off magit purpose configuration (single or multi). (defalias 'purpose-x-magit-off #[0 "\300\301!\210\302\303\304\"\207" [purpose-del-extension-configuration :magit eval-after-load magit #[0 "\203\302\211\207" [purpose-x-old-magit-display-buffer-function magit-display-buffer-function nil] 2]] 3 (#$ . 7359) nil]) #@173 Add/remove `golden-ratio' to `purpose-select-buffer-hook'. Add `golden-ratio' at the end of `purpose-select-buffer-hook' if `golden-ratio-mode' is on, otherwise remove it. (defalias 'purpose-x-sync-golden-ratio #[0 "\203\n\301\302\303\304#\207\305\302\303\"\207" [golden-ratio-mode add-hook purpose-select-buffer-hook golden-ratio t remove-hook] 4 (#$ . 7690)]) #@51 Make `golden-ratio-mode' aware of `purpose-mode'. (defalias 'purpose-x-golden-ratio-setup #[0 "\301\302\303\"\210\304\300!\205\205\301\305\306\307#\207" [golden-ratio-mode add-hook golden-ratio-mode-hook purpose-x-sync-golden-ratio boundp purpose-select-buffer-hook golden-ratio t] 4 (#$ . 8060) nil]) #@55 Make `golden-ratio-mode' forget about `purpose-mode'. (defalias 'purpose-x-golden-ratio-unset #[0 "\301\302\303\"\210\304\300!\205\205\301\305\306\"\207" [golden-ratio-mode remove-hook golden-ratio-mode-hook purpose-x-sync-golden-ratio boundp purpose-select-buffer-hook golden-ratio] 3 (#$ . 8373) nil]) (byte-code "\300\301\302\303#\203 \304\305\306\"\210\307\310\311\312\313DD\314\315\316\317\320\321\322& \210\307\323\311\312\324DD\325\315\316\317\326\321\327& \210\307\330\311\312\331DD\332\315\316\317\333\321\334& \210\307\335\311\312\336DD\337\315\316\317\340\341\342\343\344\321\345& \210\307\346\311\312\347DD\350\315\316\317\351\341\352\343\344\321\353& \210\307\354\311\312\355DD\356\315\316\317\357\341\360\343\344\321\361& \207" [require popup-switcher nil t defalias purpose-x-psw-switch-buffer-with-purpose #[0 "\300\301\302\303p!!\304\305\306\307&\207" [psw-switcher :items-list purpose-buffers-with-purpose purpose-buffer-purpose :item-name-getter buffer-name :switcher purpose-switch-buffer] 7 "Use `psw-switcher' to open another buffer with the current purpose." nil] custom-declare-variable purpose-x-popwin-position funcall function #[0 "\300\207" [bottom] 1] "Position for the popup window.\nLegal values for this variable are 'top, 'bottom, 'left and 'right. It\nis also possible to set this variable to a function. That function will\nbe used to create new popup windows and should be a display function\ncompatible with `display-buffer'." :group purpose :type (choice (const top) (const bottom) (const left) (const right) function) :package-version (window-purpose . "1.4") purpose-x-popwin-width #[0 "\300\207" [0.4] 1] "Width of popup window when displayed at left or right.\nCan have the same values as `purpose-display-at-left-width' and\n`purpose-display-at-right-width'" (choice number (const nil)) (window-purpose . "1.4") purpose-x-popwin-height #[0 "\300\207" [0.35] 1] "Height of popup window when displayed at top or bottom.\nCan have the same values as `purpose-display-at-top-height' and\n`purpose-display-at-bottom-height'" (choice number (const nil)) (window-purpose . "1.4") purpose-x-popwin-major-modes #[0 "\300\207" [(help-mode compilation-mode occur-mode)] 1] "List of major modes that should be opened as popup windows.\nWhen changing the value of this variable in elisp code, you should call\n`purpose-x-popwin-update-conf' for the change to take effect." (repeat symbol) :set #[514 "\300\"\301 \210\207" [set-default purpose-x-popwin-update-conf] 5 "\n\n(fn SYMBOL VALUE)"] :initialize custom-initialize-default (window-purpose . "1.4") purpose-x-popwin-buffer-names #[0 "\300\207" [("*Shell Command Output*")] 1] "List of buffer names that should be opened as popup windows.\nBuffers whose name is contained in this list will be opened as popup\nwindows.\nWhen changing the value of this variable in elisp code, you should call\n`purpose-x-popwin-update-conf' for the change to take effect." (repeat string) #[514 "\300\"\301 \210\207" [set-default purpose-x-popwin-update-conf] 5 "\n\n(fn SYMBOL VALUE)"] (window-purpose . "1.4") purpose-x-popwin-buffer-name-regexps #[0 "\300\207" [nil] 1] "List of regexp that should be opened as popup windows.\nBuffers whose name matches a regexp in this list will be opened as popup\nwindows.\nWhen changing the value of this variable in elisp code, you should call\n`purpose-x-popwin-update-conf' for the change to take effect." (repeat string) #[514 "\300\"\301 \210\207" [set-default purpose-x-popwin-update-conf] 5 "\n\n(fn SYMBOL VALUE)"] (window-purpose . "1.4")] 14) #@237 Set up a popup-like behavior for buffers with purpose PURPOSE. DISPLAY-FN is the display function to use for creating the popup window for purpose PURPOSE, and defaults to `purpose-display-at-bottom'. (fn PURPOSE &optional DISPLAY-FN) (defalias 'purpose-x-popupify-purpose #[513 "\301\302\303$\304\305\206\306FB\211\207" [purpose-special-action-sequences cl-delete :key car purpose-display-reuse-window-buffer purpose-display-reuse-window-purpose purpose-display-at-bottom] 7 (#$ . 11957)]) #@196 Remove popup-like behavior for buffers purpose PURPOSE. This actually removes any special treatment for PURPOSE in `purpose-special-action-sequences', not only popup-like behavior. (fn PURPOSE) (defalias 'purpose-x-unpopupify-purpose #[257 "\301\302\303$\211\207" [purpose-special-action-sequences cl-delete :key car] 6 (#$ . 12465)]) #@200 Update purpose-x-popwin's purpose configuration. The configuration is updated according to `purpose-x-popwin-major-modes', `purpose-x-popwin-buffer-names' and `purpose-x-popwin-buffer-name-regexps'. (defalias 'purpose-x-popwin-update-conf #[0 "\303\304\305\306\307\"\310\307 \"\311\307\n\"&\312\313\"\207" [purpose-x-popwin-major-modes purpose-x-popwin-buffer-names purpose-x-popwin-buffer-name-regexps #[257 "\211\300B\207" [popup] 3 "\n\n(fn X)"] purpose-conf "popwin" :mode-purposes mapcar :name-purposes :regexp-purposes purpose-set-extension-configuration :popwin] 11 (#$ . 12811) nil]) #@121 Return function for creating new popup windows. The function is determined by the value of `purpose-x-popwin-position'. (defalias 'purpose-x-popwin-get-display-function #[0 "\301\267\202\302\207\303\207\304\207\305\207\306!\203\206\307\310\"\207" [purpose-x-popwin-position #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (quote 6 top 6 bottom 8 left 10 right 12)) purpose-display-at-top purpose-display-at-bottom purpose-display-at-left purpose-display-at-right functionp user-error "purpose-x-popwin-position has an invalid value: %S"] 3 (#$ . 13418)]) #@101 Display BUFFER in a popup window. See `display-buffer' for the meaning of ALIST. (fn BUFFER ALIST) (defalias 'purpose-x-popwin-display-buffer #[514 "\211 \211\306 \"\307\310\"\210\311 \210\211\262,\207" [purpose-x-popwin-height purpose-x-popwin-width purpose-display-at-right-width purpose-display-at-left-width purpose-display-at-bottom-height purpose-display-at-top-height purpose-x-popwin-get-display-function purpose-set-window-purpose-dedicated-p t purpose-x-popwin-add-hooks] 6 (#$ . 14027)]) #@201 Delete all popup windows. Internally, this function works be deleting all windows that have the 'popup purpose. It also buried all popup buffers so they don't bother the user when switching buffers. (defalias 'purpose-x-popwin-close-windows #[0 "\300\301\302\303!\"\210\300\304\305\303!\"\207" [mapc delete-window purpose-windows-with-purpose popup bury-buffer purpose-buffers-with-purpose] 4 (#$ . 14543) nil]) #@51 Set hooks for closing popup window automatically. (defalias 'purpose-x-popwin-add-hooks #[0 "\300\301\302\"\210\303\304\305\"\207" [global-set-key [remap keyboard-quit] #[0 "\300\301!\207" [purpose-x-popwin-closer-1 t] 2 nil nil] add-hook purpose-select-buffer-hook purpose-x-popwin-closer-1] 3 (#$ . 14962)]) #@114 Remove hooks for closing popup window automatically. This basically is an undo for `purpose-x-popwin-add-hooks'. (defalias 'purpose-x-popwin-remove-hooks #[0 "\300\301\302\"\210\303\304\305\"\207" [global-set-key [remap keyboard-quit] nil remove-hook purpose-select-buffer-hook purpose-x-popwin-closer-1] 3 (#$ . 15279)]) #@106 Prevent current popup window from being automatically closed. To cancel, use `purpose-x-popwin-unstick'. (defalias 'purpose-x-popwin-stick #[0 "\300\301!\203 \302 \207\303\304!\207" [purpose-windows-with-purpose popup purpose-x-popwin-remove-hooks user-error "There is no popup window"] 2 (#$ . 15608) nil]) #@102 Allow current popup window to close automatically. This is the opposite of `purpose-x-popwin-stick'. (defalias 'purpose-x-popwin-unstick #[0 "\300\301!\203 \302 \207\303\304!\207" [purpose-windows-with-purpose popup purpose-x-popwin-add-hooks user-error "There is no popup window"] 2 (#$ . 15924) nil]) #@438 Close popup window if appropriate, and remove hooks. Closes the popup window if the selected window is not a popup window, a helm window, or a minibuffer window. If FORCE is non-nil, close popup window regardless to other conditions. After closing the popup window, the relevant hooks are removed with `purpose-x-popwin-remove-hooks'. Note that the hooks are not removed if the popup window doesn't need to close. (fn &optional FORCE) (defalias 'purpose-x-popwin-closer-1 #[256 "\211?\205\300 \301>\206\302 ?\205\303\216\304 )\207" [purpose-window-purpose (helm popup) window-minibuffer-p #[0 "\300 \207" [purpose-x-popwin-remove-hooks] 1] purpose-x-popwin-close-windows] 3 (#$ . 16235)]) #@115 Close pop up window when there aren't previous buffers can be shown in it. (fn FN &optional WINDOW BURY-OR-KILL) (defalias 'purpose-x-popwin-quit-restore-window-advice #[769 "\3001\f\301\302\"0\202\210\303\211\2057\"\210\304!\2057\305\306\"?\2057\307!?\2057\31015\311!0\207\210\303\207" [(error) window-normalize-window t nil window-live-p window-parameter quit-restore window-prev-buffers (error) delete-window] 7 (#$ . 16939)]) #@530 Activate `popwin' emulation. This extension treats certain buffers as "popup" buffers and displays them in a special popup window. The window is closed automatically when selecting another buffer (via `switch-to-buffer' and the like), or by pressing \[keyboard-quit]. You can control which buffers are treated as popup buffers by changing the variables `purpose-x-popwin-major-modes', `purpose-x-popwin-buffer-names' and `purpose-x-popwin-buffer-name-regexps'. Look at `purpose-x-popwin-*' variables and functions to learn more. (defalias 'purpose-x-popwin-setup #[0 "\301 \210\302\303\304\305$\306\303\307\"\210\310\311\312\313#\207" [purpose-special-action-sequences purpose-x-popwin-update-conf cl-delete popup :key car purpose-x-popupify-purpose purpose-x-popwin-display-buffer advice-add quit-restore-window :around purpose-x-popwin-quit-restore-window-advice] 5 (#$ . 17393) nil]) #@32 Deactivate `popwin' emulation. (defalias 'purpose-x-popwin-unset #[0 "\300\301!\210\302\303!\210\304 \210\305\306\307\"\207" [purpose-del-extension-configuration :popwin purpose-x-unpopupify-purpose popup purpose-x-popwin-remove-hooks advice-remove quit-restore-window purpose-x-popwin-quit-restore-window-advice] 3 (#$ . 18288) nil]) #@346 Hash table holding perspectives' purpose configurations. The table maps a perspective's name to its purpose configuration. A perspective's name is a string (obviously), and its purpose configuration is a `purpose-conf' object. To add/remove entries, use: (puthash purpose-x-persp-confs) (remhash purpose-x-persp-confs) (defvar purpose-x-persp-confs (make-hash-table :test 'equal) (#$ . 18630)) #@55 Activate current perspective's purpose configuration. (defalias 'purpose-x-persp-activate #[0 "\301\302\303 !\"\211\203\304\305\"\207\306 \207" [purpose-x-persp-confs gethash persp-name persp-curr purpose-set-extension-configuration :perspective purpose-x-persp-remove] 4 (#$ . 19056)]) #@53 Remove current perspective's purpose configuration. (defalias 'purpose-x-persp-remove #[0 "\300\301!\207" [purpose-del-extension-configuration :perspective] 2 (#$ . 19353)]) #@101 Activate/remove current perspective's purpose configuration. Should be hooked to `persp-mode-hook'. (defalias 'purpose-x-persp-activate-or-remove #[0 "\203\301 \207\302 \207" [persp-mode purpose-x-persp-activate purpose-x-persp-remove] 1 (#$ . 19534)]) #@323 Activate purpose-x-persp extension. This extension automatically activates a purpose configuration for the current perspective. The configuration changes automatically when switching perspectives or when toggling `persp-mode'. The variable `purpose-x-persp-confs' matches between perspectives and purpose configurations. (defalias 'purpose-x-persp-setup #[0 "\301\300!\204\n\302\303!\210\304\305\306\"\210\304\307\310\"\210\205\306 \207" [persp-mode fboundp user-error "Can't load purpose-x-persp: perspective not available" add-hook persp-switch-hook purpose-x-persp-activate persp-mode-hook purpose-x-persp-activate-or-remove] 3 (#$ . 19797) nil]) #@39 Deactivate purpose-x-persp extension. (defalias 'purpose-x-persp-unset #[0 "\300\301\302\"\210\300\303\304\"\210\305 \207" [remove-hook persp-switch-hook purpose-x-persp-activate persp-mode-hook purpose-x-persp-activate-or-remove purpose-x-persp-remove] 3 (#$ . 20458) nil]) #@133 Get names of all buffers with same purpose and perspective as current buffer. The returned list doesn't contain the current buffer. (defalias 'purpose-x-persp-get-buffer-names #[0 "\300\301 !\302\303\304\305\306\"\307p\310\311p!!\"\"\"\207" [persp-buffers persp-curr mapcar buffer-name cl-delete-if-not make-closure #[257 "\211\300\235\207" [V0] 3 "\n\n(fn BUFFER)"] delete purpose-buffers-with-purpose purpose-buffer-purpose] 10 (#$ . 20740)]) #@305 Switch to BUFFER, limited by purpose and perspective. BUFFER is chosen from buffers with the same purpose as the current buffer that are also part of the current perspective. NORECORD and FORCE-SAME-WINDOW have the same meaning as in `switch-to-buffer'. (fn BUFFER &optional NORECORD FORCE-SAME-WINDOW) (defalias 'purpose-x-persp-switch-buffer #[769 "\300#\207" [switch-to-buffer] 7 (#$ . 21193) (byte-code "\300\301\302 \303\304$C\207" [completing-read "Switch to buffer: " purpose-x-persp-get-buffer-names nil confirm] 5)]) #@366 Switch to BUFFER in other window, limited by purpose and perspective. NORECORD has the same meaning as in `switch-to-buffer-other-window'. The relation between `purpose-x-persp-switch-buffer-other-window' and `switch-to-buffer-other-window' is the same as the relation between `purpose-x-persp-switch-buffer' and `switch-to-buffer'. (fn BUFFER &optional NORECORD) (defalias 'purpose-x-persp-switch-buffer-other-window #[513 "\300\"\207" [switch-to-buffer-other-window] 5 (#$ . 21730) (byte-code "\300\301\302 \303\304$C\207" [completing-read "Switch to buffer in other window: " purpose-x-persp-get-buffer-names nil confirm] 5)]) #@362 Switch to BUFFER in other frame, limited by purpose and perspective. NORECORD has the same meaning as in `switch-to-buffer-other-frame'. The relation between `purpose-x-persp-switch-buffer-other-frame' and `switch-to-buffer-other-frame' is the same as the relation between `purpose-x-persp-switch-buffer' and `switch-to-buffer'. (fn BUFFER &optional NORECORD) (defalias 'purpose-x-persp-switch-buffer-other-frame #[513 "\300\"\207" [switch-to-buffer-other-frame] 5 (#$ . 22370) (byte-code "\300\301\302 \303\304$C\207" [completing-read "Switch to buffer in other frame: " purpose-x-persp-get-buffer-names nil confirm] 5)]) #@821 Replace BUFFER-OR-NAME with some other buffer in all windows showing it. BUFFER-OR-NAME may be a buffer or the name of an existing buffer and defaults to the current buffer. When a window showing BUFFER-OR-NAME is buffer-dedicated, that window is deleted. If that window is the only window on its frame, the frame is deleted too when there are other frames left. If there are no other frames left, some other buffer is displayed in that window. When a window showing BUFFER-OR-NAME is purpose-dedicated, BUFFER-OR-NAME is replaced with another buffer with the same purpose. If there are no other buffers with the same purpose, follow the same rules as if the window was buffer-dedicated. This function removes the buffer denoted by BUFFER-OR-NAME from all window-local buffer lists. (fn &optional BUFFER-OR-NAME) (defalias 'purpose-x-replace-buffer-in-windows-1 #[256 "\300!\301\211\302\301\211\303#\211\205\221\211@\304!=\203\204\305\303\211#\204\212\306!\307!\310!\204:\311\312!\"\262\303\262\203M\203M\313@\"\266\202\212\203q\211\203q\204q\211\314=\203i\315\316!!\266\202\212\317!\266\202\212\320\301\"\210\321\301\"\210\322\323\"\266\202\212\324\"\210A\266\202\202\n\207" [window-normalize-buffer nil window-list-1 t window-buffer window--delete purpose-buffer-purpose purpose-window-purpose-dedicated-p window-deletable-p delete purpose-buffers-with-purpose set-window-buffer frame delete-frame window-frame delete-window purpose-set-window-purpose-dedicated-p set-window-dedicated-p switch-to-prev-buffer kill unrecord-window-buffer] 13 (#$ . 23003) "bBuffer to replace: "]) #@99 Override `replace-buffer-in-windows' with a purpose-aware version. (fn &optional BUFFER-OR-NAME) (defalias 'purpose-x-replace-buffer-in-windows #[256 "\300!\207" [purpose-x-replace-buffer-in-windows-1] 3 (#$ . 24646)]) #@257 Synchronize `replace-buffer-in-windows' with `purpose-mode'. If `purpose-mode' is enabled, override `replace-buffer-in-windows' with `purpose-x-replace-buffer-in-windows'. If `purpose-mode' is disabled, cancel the override of `replace-buffer-in-windows'. (defalias 'purpose-x-kill-sync #[0 "\203\n\301\302\303\304#\207\305\302\304\"\207" [purpose-mode advice-add replace-buffer-in-windows :override purpose-x-replace-buffer-in-windows advice-remove] 4 (#$ . 24874)]) #@566 Activate purpose-x-kill extension. This extension makes `kill-buffer' aware of the purpose-dedicated window parameter, when killing a visible buffer. If a buffer that is being killed is displayed in a window,and that window is purpose-dedicated, then try to replace the buffer with another buffer with the same purpose. If that isn't possible, treat the window as if it was buffer-dedicated. This is implemented by overriding `replace-buffer-in-windows' with `purpose-x-replace-buffer-in-windows-1'. See `purpose-x-replace-buffer-in-windows-1' for more details. (defalias 'purpose-x-kill-setup #[0 "\300 \210\301\302\300\"\207" [purpose-x-kill-sync add-hook purpose-mode-hook] 3 (#$ . 25351) nil]) #@38 Deactivate purpose-x-kill extension. (defalias 'purpose-x-kill-unset #[0 "\300\301\302\"\210\303\304\305\"\207" [advice-remove replace-buffer-in-windows purpose-x-replace-buffer-in-windows remove-hook purpose-mode-hook purpose-x-kill-sync] 3 (#$ . 26058) nil]) (provide 'window-purpose-x)