;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!\210\300\306!\210\300\307!\210\300\310!\207" [require easymenu window-purpose-utils window-purpose-configuration window-purpose-core window-purpose-layout window-purpose-switch window-purpose-prefix-overload window-purpose-fixes] 2) #@20 Purpose's version. (defconst purpose-version "1.8.1" (#$ . 393)) #@254 Create an interactive lambda to conditionally call an ido command. The lambda calls IDO-FN interactively when `ido-mode' is on, otherwise it calls OTHER-FN interactively. Example: (purpose-ido-caller #'ido-find-file #'find-file) (fn IDO-FN OTHER-FN) (defalias 'purpose-ido-caller '(macro . #[514 "\300\301\302\303\304\305FDF\207" [lambda (&rest _args) (interactive) call-interactively if ido-mode] 10 (#$ . 465)])) (byte-code "\300\301\302\303#\304\301\305\306#\210\307\310\311\312#\210\307\313\314\315#\210\307\316\317\320#\210\307\321\322\323#\210\307\324\325\326#\210\307\327\330\331#\207" [function-put purpose-ido-caller lisp-indent-function nil put edebug-form-spec (function-form function-form) defalias purpose-friendly-find-file #[128 "\301\203 \302\202\n\303!\207" [ido-mode call-interactively ido-find-file find-file] 3 "\n\n(fn &rest ARGS)" nil] "Call `find-file' or `ido-find-file' intelligently.\nIf `ido-mode' is on, call `ido-find-file'. Otherwise, call `find-file'.\nThis allows Purpose to work well with both `ido' and `helm'." purpose-friendly-find-file-other-window #[128 "\301\203 \302\202\n\303!\207" [ido-mode call-interactively ido-find-file-other-window find-file-other-window] 3 "\n\n(fn &rest ARGS)" nil] "Call `find-file-other-window' or `ido-find-file-other-window'\nintelligently.\nIf `ido-mode' is on, call `ido-find-file-other-window'. Otherwise, call\n`find-file-other-window'.\nThis allows Purpose to work well with both `ido' and `helm'." purpose-friendly-find-file-other-frame #[128 "\301\203 \302\202\n\303!\207" [ido-mode call-interactively ido-find-file-other-frame find-file-other-frame] 3 "\n\n(fn &rest ARGS)" nil] "Call `find-file-other-frame' or `ido-find-file-other-frame'\nintelligently.\nIf `ido-mode' is on, call `ido-find-file-other-frame'. Otherwise, call\n`find-file-other-frame'.\nThis allows Purpose to work well with both `ido' and `helm'." purpose-friendly-switch-buffer #[128 "\301\203 \302\202\n\303!\207" [ido-mode call-interactively ido-switch-buffer switch-to-buffer] 3 "\n\n(fn &rest ARGS)" nil] "Call `switch-to-buffer' or `ido-switch-buffer' intelligently.\nIf `ido-mode' is on, call `ido-switch-buffer'. Otherwise, call\n`switch-to-buffer'.\nThis allows Purpose to work well with both `ido' and `helm'." purpose-friendly-switch-buffer-other-window #[128 "\301\203 \302\202\n\303!\207" [ido-mode call-interactively ido-switch-buffer-other-window switch-to-buffer-other-window] 3 "\n\n(fn &rest ARGS)" nil] "Call `switch-to-buffer-other-window' or\n`ido-switch-buffer-other-window' intelligently.\nIf `ido-mode' is on, call `ido-switch-buffer-other-window'. Otherwise,\ncall `switch-to-buffer-other-window'.\nThis allows Purpose to work well with both `ido' and `helm'." purpose-friendly-switch-buffer-other-frame #[128 "\301\203 \302\202\n\303!\207" [ido-mode call-interactively ido-switch-buffer-other-frame switch-to-buffer-other-frame] 3 "\n\n(fn &rest ARGS)" nil] "Call `switch-to-buffer-other-frame' or\n`ido-switch-buffer-other-frame' intelligently.\nIf `ido-mode' is on, call `ido-switch-buffer-other-frame'. Otherwise,\ncall `switch-to-buffer-other-frame'.\nThis allows Purpose to work well with both `ido' and `helm'."] 5) (defalias 'find-file-without-purpose #[0 "\301\302\303!)\207" [purpose--active-p nil call-interactively find-file] 2 nil nil]) (defalias 'find-file-other-window-without-purpose #[0 "\301\302\303!)\207" [purpose--active-p nil call-interactively find-file-other-window] 2 nil nil]) (defalias 'find-file-other-frame-without-purpose #[0 "\301\302\303!)\207" [purpose--active-p nil call-interactively find-file-other-frame] 2 nil nil]) (defalias 'switch-buffer-without-purpose #[0 "\301\302\303!)\207" [purpose--active-p nil call-interactively switch-to-buffer] 2 nil nil]) (defalias 'switch-buffer-other-window-without-purpose #[0 "\301\302\303!)\207" [purpose--active-p nil call-interactively switch-to-buffer-other-window] 2 nil nil]) (defalias 'switch-buffer-other-frame-without-purpose #[0 "\301\302\303!)\207" [purpose--active-p nil call-interactively switch-to-buffer-other-frame] 2 nil nil]) #@247 This function was generated by `define-purpose-prefix-overload'. \[purpose-find-file-overload]: `purpose-friendly-find-file' C-u \[purpose-find-file-overload], C-u 1 \[purpose-find-file-overload]: `find-file-without-purpose' (fn &optional ARG) (defalias 'purpose-find-file-overload #[256 "\300!\211\3018\211\203\302!\207\303\304\"\207" [purpose--prefix-arg-to-index (purpose-friendly-find-file find-file-without-purpose) call-interactively error "Index %s too big"] 6 (#$ . 4599) "P"]) #@312 This function was generated by `define-purpose-prefix-overload'. \[purpose-find-file-other-window-overload]: `purpose-friendly-find-file-other-window' C-u \[purpose-find-file-other-window-overload], C-u 1 \[purpose-find-file-other-window-overload]: `find-file-other-window-without-purpose' (fn &optional ARG) (defalias 'purpose-find-file-other-window-overload #[256 "\300!\211\3018\211\203\302!\207\303\304\"\207" [purpose--prefix-arg-to-index (purpose-friendly-find-file-other-window find-file-other-window-without-purpose) call-interactively error "Index %s too big"] 6 (#$ . 5099) "P"]) #@307 This function was generated by `define-purpose-prefix-overload'. \[purpose-find-file-other-frame-overload]: `purpose-friendly-find-file-other-frame' C-u \[purpose-find-file-other-frame-overload], C-u 1 \[purpose-find-file-other-frame-overload]: `find-file-other-frame-without-purpose' (fn &optional ARG) (defalias 'purpose-find-file-other-frame-overload #[256 "\300!\211\3018\211\203\302!\207\303\304\"\207" [purpose--prefix-arg-to-index (purpose-friendly-find-file-other-frame find-file-other-frame-without-purpose) call-interactively error "Index %s too big"] 6 (#$ . 5703) "P"]) #@388 This function was generated by `define-purpose-prefix-overload'. \[purpose-switch-buffer-overload]: `purpose-friendly-switch-buffer' C-u \[purpose-switch-buffer-overload], C-u 1 \[purpose-switch-buffer-overload]: `switch-buffer-without-purpose' C-u C-u \[purpose-switch-buffer-overload], C-u 2 \[purpose-switch-buffer-overload]: `purpose-switch-buffer-with-purpose' (fn &optional ARG) (defalias 'purpose-switch-buffer-overload #[256 "\300!\211\3018\211\203\302!\207\303\304\"\207" [purpose--prefix-arg-to-index (purpose-friendly-switch-buffer switch-buffer-without-purpose purpose-switch-buffer-with-purpose) call-interactively error "Index %s too big"] 6 (#$ . 6299) "P"]) #@492 This function was generated by `define-purpose-prefix-overload'. \[purpose-switch-buffer-other-window-overload]: `purpose-friendly-switch-buffer-other-window' C-u \[purpose-switch-buffer-other-window-overload], C-u 1 \[purpose-switch-buffer-other-window-overload]: `switch-buffer-other-window-without-purpose' C-u C-u \[purpose-switch-buffer-other-window-overload], C-u 2 \[purpose-switch-buffer-other-window-overload]: `purpose-switch-buffer-with-purpose-other-window' (fn &optional ARG) (defalias 'purpose-switch-buffer-other-window-overload #[256 "\300!\211\3018\211\203\302!\207\303\304\"\207" [purpose--prefix-arg-to-index (purpose-friendly-switch-buffer-other-window switch-buffer-other-window-without-purpose purpose-switch-buffer-with-purpose-other-window) call-interactively error "Index %s too big"] 6 (#$ . 6987) "P"]) #@484 This function was generated by `define-purpose-prefix-overload'. \[purpose-switch-buffer-other-frame-overload]: `purpose-friendly-switch-buffer-other-frame' C-u \[purpose-switch-buffer-other-frame-overload], C-u 1 \[purpose-switch-buffer-other-frame-overload]: `switch-buffer-other-frame-without-purpose' C-u C-u \[purpose-switch-buffer-other-frame-overload], C-u 2 \[purpose-switch-buffer-other-frame-overload]: `purpose-switch-buffer-with-purpose-other-frame' (fn &optional ARG) (defalias 'purpose-switch-buffer-other-frame-overload #[256 "\300!\211\3018\211\203\302!\207\303\304\"\207" [purpose--prefix-arg-to-index (purpose-friendly-switch-buffer-other-frame switch-buffer-other-frame-without-purpose purpose-switch-buffer-with-purpose-other-frame) call-interactively error "Index %s too big"] 6 (#$ . 7831) "P"]) #@462 This function was generated by `define-purpose-prefix-overload'. \[purpose-delete-window-at]: `purpose-delete-window-at-bottom' C-u \[purpose-delete-window-at], C-u 1 \[purpose-delete-window-at]: `purpose-delete-window-at-right' C-u C-u \[purpose-delete-window-at], C-u 2 \[purpose-delete-window-at]: `purpose-delete-window-at-top' C-u C-u C-u \[purpose-delete-window-at], C-u 3 \[purpose-delete-window-at]: `purpose-delete-window-at-left' (fn &optional ARG) (defalias 'purpose-delete-window-at #[256 "\300!\211\3018\211\203\302!\207\303\304\"\207" [purpose--prefix-arg-to-index (purpose-delete-window-at-bottom purpose-delete-window-at-right purpose-delete-window-at-top purpose-delete-window-at-left) call-interactively error "Index %s too big"] 6 (#$ . 8663) "P"]) #@26 Keymap for Purpose mode. (defvar purpose-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\306#\210\302\310\311#\210\302\312\311#\210\302\313\314#\210\302\315\316#\210\302\317\320#\210\302\321\322#\210\302\323\300#\210\324\300!\210\325\326\211:\203c@\262\211A\262\242\262\302#\210A\262\202E\266\207" [purpose-mode-prefix-map make-sparse-keymap define-key "" purpose-find-file-overload "4f" purpose-find-file-other-window-overload "4" "5f" purpose-find-file-other-frame-overload "5" "b" purpose-switch-buffer-overload "4b" purpose-switch-buffer-other-window-overload "5b" purpose-switch-buffer-other-frame-overload "j" quit-window "," define-prefix-command (("o" . purpose-switch-buffer) ("[" . purpose-switch-buffer-other-frame) ("p" . purpose-switch-buffer-other-window) ("b" . purpose-switch-buffer-with-purpose) ("4 b" . purpose-switch-buffer-with-purpose-other-window) ("5 b" . purpose-switch-buffer-with-purpose-other-frame) ("d" . purpose-toggle-window-purpose-dedicated) ("D" . purpose-toggle-window-buffer-dedicated) ("w" . purpose-delete-window-at) ("1" . purpose-delete-non-dedicated-windows)) nil] 8) (#$ . 9444)) #@14 Purpose Mode (defvar purpose-menu nil (#$ . 10631)) (easy-menu-do-define 'purpose-menu purpose-mode-map "Purpose Mode" '("Purpose" ["Toggle Buffer Dedication" purpose-toggle-window-buffer-dedicated :help "Toggle current window's dedication to its current buffer"] ["Toggle Purpose Dedication" purpose-toggle-window-purpose-dedicated :help "Toggle current window's dedication to its current purpose"] ["Change Window Purpose" purpose-set-window-purpose :help "Select a purpose for the current window and change its buffer accordingly"] ["Delete Non-Dedicated Windows" purpose-delete-non-dedicated-windows :help "Delete all windows that aren't dedicated to their buffer or purpose"] ["Load Window Layout" purpose-load-window-layout t] ["Save Window Layout" purpose-save-window-layout t] ["Load Frame Layout" purpose-load-frame-layout t] ["Save Frame Layout" purpose-save-frame-layout t])) #@535 Return the presentation of a window's purpose for display in the modeline. The basic form of the string is "[]". If the window is purpose-dedicated, add a "!" before "]". If the window is buffer-dedicated, add a "#" before "]". Some examples: "[edit]": window's purpose is 'edit, and it is not dedicated. "[edit!]": window is dedicated to 'edit purpose. "[edit#]": window's purpose is 'edit, and it is dedicated to its current buffer. "[edit!#]": window is dedicated to 'edit purpose and to its current buffer. (defalias 'purpose--modeline-string #[0 "\300\301\302 \303 \203 \304\202\305\306 \203\307\202\305$\207" [format " [%s%s%s]" purpose-window-purpose purpose-window-purpose-dedicated-p "!" "" window-dedicated-p "#"] 5 (#$ . 11525)]) #@103 Add all advices needed for Purpose to work. This function is called when `purpose-mode' is activated. (defalias 'purpose--add-advices #[0 "\300\301\302\303#\210\300\304\302\305#\210\300\306\302\307#\210\300\310\302\311#\210\300\312\302\313#\210\300\314\302\315#\207" [advice-add switch-to-buffer :around purpose-switch-to-buffer-advice switch-to-buffer-other-window purpose-switch-to-buffer-other-window-advice switch-to-buffer-other-frame purpose-switch-to-buffer-other-frame-advice pop-to-buffer purpose-pop-to-buffer-advice pop-to-buffer-same-window purpose-pop-to-buffer-same-window-advice display-buffer purpose-display-buffer-advice] 4 (#$ . 12303)]) #@108 Remove all advices needed for Purpose to work. This function is called when `purpose-mode' is deactivated. (defalias 'purpose--remove-advices #[0 "\300\301\302\"\210\300\303\304\"\210\300\305\306\"\210\300\307\310\"\210\300\311\312\"\210\300\313\314\"\207" [advice-remove switch-to-buffer purpose-switch-to-buffer-advice switch-to-buffer-other-window purpose-switch-to-buffer-other-window-advice switch-to-buffer-other-frame purpose-switch-to-buffer-other-frame-advice pop-to-buffer purpose-pop-to-buffer-advice pop-to-buffer-same-window purpose-pop-to-buffer-same-window-advice display-buffer purpose-display-buffer-advice] 3 (#$ . 12967)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable purpose-mode funcall function #[0 "\300\207" [nil] 1] "Non-nil if Purpose mode is enabled.\nSee the `purpose-mode' command\nfor a description of this minor mode.\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `purpose-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :type boolean] 10) #@618 Toggle Purpose mode on or off. This is a minor mode. If called interactively, toggle the `Purpose 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 'purpose-mode)'. The mode's hook is called both when the mode is enabled and when it is disabled. \{purpose-mode-map} (fn &optional ARG) (defalias 'purpose-mode #[256 "\305 \306\301\307=\203\310\301!?\202!\247\203 \311W\203 \312\202!\313\"\210\314\300!\2038\315\301\"\310\301!\2038\301B \203Q\316 \210\317\313\f\204J\320 \210\321\304!\210\202Z\322 \210\312\321\304!\210\321\323\310\301!\203f\324\202g\325\"\210\326\327!\203\217\330\301!\210\305 \203\211\305 \232\203\217\331\332\310\301!\203\213\333\202\214\334\335#\210\210\336 \210\310\301!\207" [global-minor-modes purpose-mode display-buffer-overriding-action purpose--active-p purpose-fix-togglers-hook current-message set-default toggle default-value 1 nil t boundp delq purpose--add-advices (purpose--action-function) purpose-fix-install run-hooks purpose--remove-advices purpose-mode-hook purpose-mode-on-hook purpose-mode-off-hook called-interactively-p any customize-mark-as-set message "Purpose mode %sabled%s" "en" "dis" "" force-mode-line-update] 6 (#$ . 14112) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar purpose-mode-hook nil) (byte-code "\302\303N\204\f\304\302\303\305#\210\304\302\306\307#\210\304\302\310\311C#\210\312\313\314\315\300!\205#\311\211%\210\316 B\317\320!\207" [purpose-mode-map window-persistent-parameters purpose-mode-hook variable-documentation put "Hook run after entering or leaving `purpose-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 purpose-mode (:eval (purpose--modeline-string)) boundp (purpose-dedicated . writable) provide window-purpose] 6)