;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (defconst popwin:version "1.0.1") #@82 Return a singleton list of OBJECT if OBJECT is an atom, otherwise OBJECT itself. (defalias 'popwin:listify #[(object) ":\204C\207\207" [object] 1 (#$ . 121)]) #@30 Not documented (MAP) (TREE). (defalias 'popwin:subsitute-in-tree #[(map tree) ":\203\302 @\"\302 A\"B\207 \236A\206\207" [tree map popwin:subsitute-in-tree] 4 (#$ . 291)]) #@334 Return a buffer named BUFFER-OR-NAME or BUFFER-OR-NAME itself if BUFFER-OR-NAME is a buffer. If BUFFER-OR-NAME is a string and such a buffer named BUFFER-OR-NAME not found, a new buffer will be returned when IF-NOT-FOUND is :create, or an error reported when IF-NOT-FOUND is :error. The default of value of IF-NOT-FOUND is :error. (defalias 'popwin:get-buffer #[(buffer-or-name &optional if-not-found) "\206\303\211\304\267\202\305\n!\202(\306\n!\206(\307\310\n\"\202(\307\311 \312#\205(\313)\207" [if-not-found #1=#:temp buffer-or-name :error #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:create 12 :error 18)) get-buffer-create get-buffer error "No buffer named %s" "cl-ecase failed: %s, %s" (:create :error) nil] 5 (#$ . 479)]) #@139 Call `switch-to-buffer' forcing BUFFER-OR-NAME be displayed in the selected window. NORECORD is the same as `switch-to-buffer' NORECORD. (defalias 'popwin:switch-to-buffer #[(buffer-or-name &optional norecord) "\303Y\203\f\304 \n\305#\207\304 \n\"\207" [emacs-major-version buffer-or-name norecord 24 switch-to-buffer t] 4 (#$ . 1270)]) #@116 Call `select-window' (WINDOW) with saving the current buffer. NORECORD is the same as `switch-to-buffer' NORECORD. (defalias 'popwin:select-window #[(window &optional norecord) "r\302 \")\207" [window norecord select-window] 3 (#$ . 1617)]) #@60 Return t if BUFFER might be thought of as a buried buffer. (defalias 'popwin:buried-buffer-p #[(buffer) "\301\302 !@=\207" [buffer last buffer-list] 2 (#$ . 1865)]) #@101 Return `window-point' of WINDOW. If WINDOW is currently selected, then return buffer-point instead. (defalias 'popwin:window-point #[(window) "\301 =\203r\302!q\210`)\207\303!\207" [window selected-window window-buffer window-point] 2 (#$ . 2038)]) #@129 Return t if WINDOW is deletable, meaning that WINDOW is alive and not a minibuffer's window, plus there is two or more windows. (defalias 'popwin:window-deletable-p #[(window) "\301!\205\302!?\205\303 ?\207" [window window-live-p window-minibuffer-p one-window-p] 2 (#$ . 2299)]) #@43 Evaluate BODY saving the selected window. (defalias 'popwin:save-selected-window '(macro . #[(&rest body) "\301\302BB\207" [body with-selected-window (selected-window)] 3 (#$ . 2591)])) #@44 Return t if minibuffer window is selected. (defalias 'popwin:minibuffer-window-selected-p #[nil "\300\301 !\207" [minibuffer-window-active-p selected-window] 2 (#$ . 2784)]) #@94 Return currently selected window or lastly selected window if minibuffer window is selected. (defalias 'popwin:last-selected-window #[nil "\300 \203\301 \207\302 \207" [popwin:minibuffer-window-selected-p minibuffer-selected-window selected-window] 1 (#$ . 2964)]) (defvar popwin:debug nil) (defvar popwin:dummy-buffer nil) #@17 Not documented. (defalias 'popwin:dummy-buffer #[nil "\301!\203\207\302\303!\211\207" [popwin:dummy-buffer buffer-live-p get-buffer-create " *popwin-dummy*"] 2 (#$ . 3296)]) #@17 Not documented. (defalias 'popwin:kill-dummy-buffer #[nil "\301!\203\n\302!\210\303\211\207" [popwin:dummy-buffer buffer-live-p kill-buffer nil] 2 (#$ . 3481)]) #@54 Return t if a trailing edge of WINDOW is adjustable. (defalias 'popwin:window-trailing-edge-adjustable-p #[(window) "\301!\211\302 =?\205\303 !\304 =?)\207" [window next-window frame-first-window window-buffer popwin:dummy-buffer] 3 (#$ . 3652)]) #@154 Adjust edges of WINDOW to EDGES accoring to horizontal factor HFACTOR, and vertical factor VFACTOR. (fn WINDOW EDGES &optional (HFACTOR 1) (VFACTOR 1)) (defalias 'popwin:adjust-window-edges #[(window edges &rest #1=#:--cl-rest--) "\203\f\211A\242\202 \306\203\211A\242\202\306\203*\307\310\311\312G\\D\"\210\313 !\205\372\f\314 !D\211G\315U\203E \211A\242\202L\307\310\316 GD\"\211G\312U\203_\211A\242\202g\307\310\316GD\"\211A\242\211A\242\242 \242\211G\312U\203\225\211A\242\202\235\307\310\316GD\"\211A\242\211A\242\242\317Z _ZZ!\317Z\n_ZZ! \3201\347\321  \322#0\210\202\350\210\3231\366\321 \324#0\202\370\210\324. *\207" [#1# hfactor vfactor window edges #2=#:--cl-rest-- 1 signal wrong-number-of-arguments popwin:adjust-window-edges 4 popwin:window-trailing-edge-adjustable-p window-edges 2 ((left top right bottom) (cur-left cur-top cur-right cur-bottom)) floor (error) adjust-window-trailing-edge t (error) nil #3=#:--cl-rest-- left top right bottom #4=#:--cl-rest-- cur-left cur-top cur-right cur-bottom vdelta hdelta] 6 (#$ . 3910)]) #@24 Not documented (NODE). (defalias 'popwin:window-config-tree-1 #[(node) "\306!\203\305\307!\310!\311!\312!\313 =\314!\257\207\211A\203- \211A\242\2024\315\316\317 GD\" \211A\242\320\n D \321\211\f:\203j\f@\306 !\203[\322 \323\"\204c\324 !B\fA\211\202G\237+\"+\207" [node windows dir edges #1=#:--cl-var-- window windowp window-buffer popwin:window-point window-start window-edges selected-window window-dedicated-p signal wrong-number-of-arguments (dir edges . windows) append nil window-parameter window-side popwin:window-config-tree-1 #2=#:--cl-var--] 10 (#$ . 5065)]) #@96 Return `window-tree' with replacing window values in the tree with persistent representations. (defalias 'popwin:window-config-tree #[nil "\303 \211G\304U\203\211A\242\202\305\306\307GD\"\242\310 !\n+D\207" [#1=#:--cl-rest-- root mini window-tree 2 signal wrong-number-of-arguments (root mini) popwin:window-config-tree-1] 5 (#$ . 5677)]) #@193 Replicate NODE of window configuration on WINDOW with horizontal factor HFACTOR, and vertical factor VFACTOR. The return value is a association list of mapping from old-window to new-window. (defalias 'popwin:replicate-window-config #[(window node hfactor vfactor) "@\306=\203\226A\211G\307U\203 \211A\242\202 \310\311\312 GD\" \211A\242 \211A\242 \211A\242 \211A\242 \211A\242 \242\313\314\"\210\315$\210\316! r\317\216\320 @\321\"\210\322 \323\"\210+\203v\324!\210\325\f\"\210\326 \323#\210\203\216\313\323\"\210\n.BC\207\211!A\203\250!\211A!\242\202\260\310\311\327!GD\"\"!\211A!\242\314\211#$\314\211%&\323'!\203\f!\211A!\242#'\203\342\202\344%$!\205\363\330$\314\"?#%\331\332$#$!&\244&\314'\202\312&\237.\207" [node #1=#:--cl-rest-- old-win buffer point start window 7 signal wrong-number-of-arguments (old-win buffer point start edges selected dedicated) set-window-dedicated-p nil popwin:adjust-window-edges internal--before-with-selected-window #[nil "\301!\207" [save-selected-window--state internal--after-with-selected-window] 2] select-window norecord popwin:switch-to-buffer t popwin:select-window set-window-point set-window-start (dir edges . windows) split-window reverse popwin:replicate-window-config edges selected dedicated hfactor vfactor save-selected-window--state windows dir sub-node win next-win #2=#:--cl-var-- #3=#:--cl-var--] 7 (#$ . 6034)]) #@152 Restore window outline accoding to the structures of NODE which is a node of `window-tree' and OUTLINE which is a node of `popwin:window-config-tree'. (defalias 'popwin:restore-window-outline #[(node outline) "\306!\203j @\307=\203j A\211G\310U\203\n\211A\242\202&\311\312\313\nGD\"\n\211A\242\n\211A\242\n\211A\242\n\211A\242\n\211A\242\n\242\314\"\210\315!\f=\205g\316! =\205g\317\".\207\306!\206\307@ @=?\206\307AA AA\211GG=\205\306\320\320:\203\304@:\203\304@\321\"\210AA\202\232,\320*\207" [node outline #1=#:--cl-rest-- old-win buffer point windowp window 7 signal wrong-number-of-arguments (old-win buffer point start edges selected dedicated) popwin:adjust-window-edges window-buffer popwin:window-point set-window-start nil popwin:restore-window-outline start edges selected dedicated child-outlines child-nodes #2=#:--cl-var-- child-node #3=#:--cl-var-- child-outline] 5 (#$ . 7514)]) #@37 Return t if POSITION is hozirontal. (defalias 'popwin:position-horizontal-p #[(position) "\301>\205\302\207" [position (left :left right :right) t] 2 (#$ . 8501)]) #@35 Return t if POSITION is vertical. (defalias 'popwin:position-vertical-p #[(position) "\301>\205\302\207" [position (top :top bottom :bottom) t] 2 (#$ . 8674)]) #@122 Create a new window with SIZE at POSITION of WINDOW. The return value is a list of a master window and the popup window. (defalias 'popwin:create-popup-window-1 #[(window size position) "\305!\306! \307\267\202:\310\f\311#D\202C\310\f\312#D\202C\310\n\fZ\311#D\202C\310 \fZ\312#D\202C\313\314 \315#\205C\312*\207" [window height width position size window-width window-height #s(hash-table size 8 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (left 14 :left 14 top 24 :top 24 right 34 :right 34 bottom 46 :bottom 46)) split-window t nil error "cl-ecase failed: %s, %s" (:left left :top top :right right :bottom bottom)] 5 (#$ . 8844)]) #@639 Create a popup window with SIZE on the frame. If SIZE is integer, the size of the popup window will be SIZE. If SIZE is float, the size of popup window will be a multiplier of SIZE and frame-size. can be an integer and a float. If ADJUST is t, all of windows will be adjusted to fit the frame. POSITION must be one of (left top right bottom). The return value is a pair of a master window and the popup window. To close the popup window properly, get `current-window-configuration' before calling this function, and call `set-window-configuration' with the window-configuration. (fn &optional (SIZE 15) (POSITION \='bottom) (ADJUST t)) (defalias 'popwin:create-popup-window #[(&rest #1=#:--cl-rest--) "\203\f\211A\242\202 \306\203\211A\242\202\307\203(\211A\242\202)\310\2038\311\312\313\314G\\D\"\210\315 @\316 \317\211$%\320\321 !&r\322\216\323&@\324\"\210\325 !\210+\326 !\327 !'( \203\261\330 !\203\222\331\n!\203\203\332 Z$\333( _!\202\261\332 Z%\333' _!\202\261\331\n!\203\246\334( Z!(\245$\202\261\334' Z!'\245%\335 \n#\211)G\336U\203\311)\211A)\242\202\321\311\312\337)GD\"*)\242+\320+!&r\340\216\323&@\324\"\210\341\342 \310\"\210+\343*\f$%$,*+,E. \207" [#1# size position adjust root root-win 15 bottom t signal wrong-number-of-arguments popwin:create-popup-window 3 popwin:window-config-tree popwin:last-selected-window 1 internal--before-with-selected-window selected-window #[nil "\301!\207" [save-selected-window--state internal--after-with-selected-window] 2] select-window norecord delete-other-windows window-width window-height floatp popwin:position-horizontal-p 1.0 round float popwin:create-popup-window-1 2 (master-win popup-win) #[nil "\301!\207" [save-selected-window--state internal--after-with-selected-window] 2] popwin:switch-to-buffer popwin:dummy-buffer popwin:replicate-window-config hfactor vfactor save-selected-window--state root-height root-width #2=#:--cl-rest-- master-win popup-win win-map] 6 (#$ . 9523)]) (byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314\315\304\301&\210\310\316\317\320\314\321\304\301&\210\310\322\323\324\314\321\304\301&\210\310\325\326\327\314\315\304\301&\210\310\330\331\332\314\333\304\301&\207" [custom-declare-group popwin nil "Popup Window Manager." :group convenience :prefix "popwin:" custom-declare-variable popwin:popup-window-position 'bottom "Default popup window position.\nThis must be one of (left top right bottom)." :type symbol popwin:popup-window-width 30 "Default popup window width.\nIf `popwin:popup-window-position' is top or bottom, this configuration\nwill be ignored. If this variable is float, the popup window width will\nbe a multiplier of the value and frame-size." number popwin:popup-window-height 15 "Default popup window height.\nIf `popwin:popup-window-position' is left or right, this configuration\nwill be ignored. If this variable is float, the popup window height will\nbe a multiplier of the value and frame-size." popwin:reuse-window 'current "Non-nil means `popwin:display-buffer' will not popup the visible buffer.\nThe value is same as a second argument of `get-buffer-window', except `current'\nmeans the selected frame." popwin:adjust-other-windows t "Non-nil means all of other windows will be adjusted to fit the frame when a popup window is shown." boolean] 8) (defvar popwin:context-stack nil) #@29 Main popup window instance. (defvar popwin:popup-window nil (#$ . 12938)) #@48 Buffer of currently shown in the popup window. (defvar popwin:popup-buffer nil (#$ . 13018)) #@50 Arguments to `popwin:popup-buffer' of last call. (defvar popwin:popup-last-config nil (#$ . 13117)) #@34 Master window of a popup window. (defvar popwin:master-window nil (#$ . 13223)) #@81 Focused window which is used to check whether or not to close the popup window. (defvar popwin:focus-window nil (#$ . 13309)) #@54 Last selected window when the popup window is shown. (defvar popwin:selected-window nil (#$ . 13441)) #@75 Non-nil means the popup window is dedicated to the original popup buffer. (defvar popwin:popup-window-dedicated-p nil (#$ . 13549)) #@48 Non-nil means the popup window has been stuck. (defvar popwin:popup-window-stuck-p nil (#$ . 13687)) #@75 Original window outline which is obtained by `popwin:window-config-tree'. (defvar popwin:window-outline nil (#$ . 13794)) #@42 Mapping from old windows to new windows. (defvar popwin:window-map nil (#$ . 13922)) #@50 An original window configuration for restoreing. (defvar popwin:window-config nil (#$ . 14013)) #@36 Timer of closing the popup window. (defvar popwin:close-popup-window-timer nil (#$ . 14115)) #@48 Interval of `popwin:close-popup-window-timer'. (defvar popwin:close-popup-window-timer-interval 0.05 (#$ . 14214)) (defvar popwin:before-popup-hook nil) (defvar popwin:after-popup-hook nil) (defalias 'popwin:valid-context-p #[(context) "\301\302\303\"!\207" [context window-live-p plist-get popwin:popup-window] 4]) (defalias 'popwin:current-context #[nil "\303\304\211:\203@\211\nB J\nBA\211\202\n\237+\207" [#1=#:--cl-var-- var #2=#:--cl-var-- (popwin:popup-window popwin:popup-buffer popwin:master-window popwin:focus-window popwin:selected-window popwin:popup-window-dedicated-p popwin:popup-window-stuck-p popwin:window-outline popwin:window-map) nil] 3]) (defalias 'popwin:use-context #[(context) "\304\211\305 \211A\242 \211A\242\203 L\210\304\202+\304\207" [var val #1=#:--cl-var-- context nil t] 3]) (defalias 'popwin:push-context #[nil "\301 B\211\207" [popwin:context-stack popwin:current-context] 2]) (defalias 'popwin:pop-context #[nil "\301\211A\242!\207" [popwin:context-stack popwin:use-context] 3]) #@31 (fn BUFFER &key VALID-ONLY) (defalias 'popwin:find-context-for-buffer #[(buffer &rest #1=#:--cl-rest--) "\306\307\"A@\n\2033\n@\310>\203\nAA\211\202\n\311>A@\203*\312\211\202\n\313\314\n@\"\210\202 ) \312\315\211\312\f\211A\242\211\203u\316 \317\"=\203k \203_\320 !\203k \fD\312\211\202l\315\203u\312\202A.\207" [#1# valid-only #2=#:--cl-keys-- popwin:context-stack stack context plist-member :valid-only (:valid-only :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:valid-only)" t plist-get popwin:popup-buffer popwin:valid-context-p #3=#:--cl-var-- #4=#:--cl-var-- #5=#:--cl-var-- buffer] 5 (#$ . 15269)]) #@45 Return t if `popwin:popup-window' is alive. (defalias 'popwin:popup-window-live-p #[nil "\301!\207" [popwin:popup-window window-live-p] 2 (#$ . 15959)]) #@59 (fn SYMBOL &key (MAP popwin:window-map) SAFE RECURSIVE) (defalias 'popwin:update-window-reference #[(symbol &rest #1=#:--cl-rest--) "\306\307\"\206\n\310 DA@\306\311\"A@\306\312\"A@ \203G @\313>\2030 AA\211\202\314>A@\203>\310\211\202\315\316 @\"\210\202) \205Q\317!??\205tJ\f\203h\320\n\"\202r\n\236A\206rL)+\207" [#1# popwin:window-map map safe recursive #2=#:--cl-keys-- plist-member :map nil :safe :recursive (:map :safe :recursive :allow-other-keys) :allow-other-keys error "Keyword argument %s not one of (:map :safe :recursive)" boundp popwin:subsitute-in-tree symbol value] 5 (#$ . 16119)]) #@17 Not documented. (defalias 'popwin:start-close-popup-window-timer #[nil "\206 \302 \211\300#\211\207" [popwin:close-popup-window-timer popwin:close-popup-window-timer-interval run-with-idle-timer] 4 (#$ . 16766)]) #@17 Not documented. (defalias 'popwin:stop-close-popup-window-timer #[nil "\205 \301!\210\302\211\207" [popwin:close-popup-window-timer cancel-timer nil] 2 (#$ . 16988)]) #@17 Not documented. (defalias 'popwin:close-popup-window-timer #[nil "\3021\303 0\207\304\305\"\210 \205\306 )\207" [var popwin:debug (error) popwin:close-popup-window-if-necessary message "popwin:close-popup-window-timer: error: %s" backtrace] 3 (#$ . 17165)]) #@152 Close the popup window and restore to the previous window configuration. If KEEP-SELECTED is non-nil, the lastly selected window will not be selected. (defalias 'popwin:close-popup-window #[(&optional keep-selected) "\205)\304\216\305!\203\306!\210\307\310 @ \"\210\311 \210\n?\205(\312 !\205(\313 !)\207" [popwin:popup-window popwin:window-outline keep-selected popwin:selected-window #[nil "\301 \210?\205 \302 \210\303 \207" [popwin:context-stack popwin:pop-context popwin:kill-dummy-buffer popwin:stop-close-popup-window-timer] 1] popwin:window-deletable-p delete-window popwin:restore-window-outline window-tree redisplay window-live-p select-window] 3 (#$ . 17436) nil]) #@332 Close the popup window if necessary. The all situations where the popup window will be closed are followings: * `C-g' has been pressed. * The popup buffer has been killed. * The popup buffer has been buried. * The popup buffer has been changed if the popup window is dedicated to the buffer. * Another window has been selected. (defalias 'popwin:close-popup-window-if-necessary #[nil "\205 \306 \307 !\303 !\310 !\211\205\311 \205\312\313=\205)\314= =?\2057 =? !\315\"!#\316\"!$%\205i&?\205i\203^ ?\205i\315 !\205i\" =?'\317 (\204\230#\203\230$\204\230'\204\230(\203\230\205\f?\205&?\205)\203\265\320\321#$'( \f&&\f\210\203\306!\204\306\322 \323\324!\210\203\340!\204\340*\203\340\325*!\210\326*\202  \203\357\322 \210\327\330 !\210\202 \322\205\375#\205\375$?!\210'\203 \331 !\210\nb\210\205!?\205\323\332!\210\322\211.\f\207" [popwin:popup-window window window-point window-buffer minibuf-window-p reading-from-minibuf selected-window popwin:window-point window-minibuffer-p minibuffer-prompt t keyboard-quit 7 buffer-live-p popwin:buried-buffer-p popwin:popup-window-live-p message "popwin: CLOSE:\n quit-requested = %s\n popup-buffer-alive = %s\n popup-buffer-buried = %s\n popup-buffer-changed-despite-of-dedicated = %s\n popup-window-alive = %s\n (selected-window) = %s\n popwin:focus-window = %s\n popwin:popup-window = %s\n other-window-selected = %s\n minibuf-window-p = %s\n popwin:popup-window-stuck-p = %s" popwin:close-popup-window run-hooks pre-command-hook set-window-configuration nil select-window minibuffer-window popwin:switch-to-buffer post-command-hook last-command last-command-event quit-requested popwin:focus-window other-window-selected this-command orig-this-command popwin:popup-buffer popup-buffer-alive popup-buffer-buried popwin:popup-window-dedicated-p popwin:popup-window-stuck-p popup-buffer-changed-despite-of-dedicated popup-window-alive popwin:debug popwin:window-config] 14 (#$ . 18130)]) #@546 Show BUFFER in a popup window and return the popup window. If NOSELECT is non-nil, the popup window will not be selected. If STICK is non-nil, the popup window will be stuck. If TAIL is non-nil, the popup window will show the last contents. Calling `popwin:popup-buffer' during `popwin:popup-buffer' is allowed. In that case, the buffer of the popup window will be replaced with BUFFER. (fn BUFFER &key (WIDTH popwin:popup-window-width) (HEIGHT popwin:popup-window-height) (POSITION popwin:popup-window-position) NOSELECT DEDICATED STICK TAIL) (defalias 'popwin:popup-buffer #[(buffer &rest #1=#:--cl-rest--) "\306\307\"\206\n\310 DA@\306\311\"\206\310 DA@\306\312\"\206$\310 DA@0\306\313\"A@1\306\314\"A@2\306\315\"A@3\306\316\"A@455\203{5@\317>\203b5AA\2115\202M\320>A@\203q\310\2115\202M\321\3225@\"\210\202K)\3236!6\324 \210\325\326!\210\3276\330\331#\2117@87A@98\203\254\3328!\2109$\202c\333 @:\3340!\203\274\n\202\275\f;<=\335=0<#*\211>G\336U\203\337>\211A>\242\202\347\337\340\341>GD\"?>\211A>\242@>\242A@B?C:DAE\310F\342 G,\343\344\345\331#\210\346 \210)\347B!Hr\350\216\351H@\352\"\210\3536!\2104\203=\354Bd\"\210\355\356!\210+6I6\307\n\311\f\3120\3131\3142\3153\3164\257J2K3L+1\203pGM\202yBM\351B!\210\325\357!\210B.\207" [#1# popwin:popup-window-width width popwin:popup-window-height height popwin:popup-window-position plist-member :width nil :height :position :noselect :dedicated :stick :tail (:width :height :position :noselect :dedicated :stick :tail :allow-other-keys) :allow-other-keys error "Keyword argument %s not one of (:width :height :position :noselect :dedicated :stick :tail)" get-buffer popwin:push-context run-hooks popwin:before-popup-hook popwin:find-context-for-buffer :valid-only t popwin:use-context popwin:window-config-tree popwin:position-horizontal-p popwin:create-popup-window 3 signal wrong-number-of-arguments (master-win popup-win win-map) selected-window popwin:update-window-reference popwin:context-stack :recursive popwin:start-close-popup-window-timer internal--before-with-selected-window #[nil "\301!\207" [save-selected-window--state internal--after-with-selected-window] 2] select-window norecord popwin:switch-to-buffer set-window-point recenter -2 popwin:after-popup-hook position noselect dedicated stick tail #2=#:--cl-keys-- buffer #3=#:--cl-var-- context context-stack win-outline popwin:adjust-other-windows adjust size #4=#:--cl-rest-- master-win popup-win win-map popwin:popup-window popwin:master-window popwin:window-outline popwin:window-map popwin:window-config popwin:selected-window save-selected-window--state popwin:popup-buffer popwin:popup-last-config popwin:popup-window-dedicated-p popwin:popup-window-stuck-p popwin:focus-window] 16 (#$ . 20190) "BPopup buffer:\n"]) #@120 Show the last popup buffer with the same configuration. If NOSELECT is non-nil, the popup window will not be selected. (defalias 'popwin:popup-last-buffer #[(&optional noselect) "\203, \203'\211\203\n\211A\242\202\304\305\306\nGD\"\307\310 \311\312\n%*\207\307\310\"\207\313\314!\207" [popwin:popup-last-config noselect keyargs buffer signal wrong-number-of-arguments (buffer . keyargs) apply popwin:popup-buffer :noselect t error "No popup buffer ever"] 7 (#$ . 23049) "P"]) (defalias 'popwin:display-last-buffer 'popwin:popup-last-buffer) #@42 Select the currently shown popup window. (defalias 'popwin:select-popup-window #[nil "\301 \203 \302!\207\303\304!\207" [popwin:popup-window popwin:popup-window-live-p select-window error "No popup window displayed"] 2 (#$ . 23608) nil]) #@104 Stick the currently shown popup window. The popup window can be closed by `popwin:close-popup-window'. (defalias 'popwin:stick-popup-window #[nil "\301 \203 \302\303\304!\207\305\306!\207" [popwin:popup-window-stuck-p popwin:popup-window-live-p t message "Popup window stuck" error "No popup window displayed"] 2 (#$ . 23855) nil]) #@43 Evaluate BODY without special displaying. (defalias 'popwin:without-special-displaying '(macro . #[(&rest body) "\301\302!\203\303\304\305BBD\207\303\304\306BBD\207" [body boundp display-buffer-alist with-no-warnings let ((display-buffer-function nil) (display-buffer-alist (remove '(popwin:display-buffer-condition popwin:display-buffer-action) display-buffer-alist))) ((display-buffer-function nil))] 4 (#$ . 24195)])) #@1859 Configuration of special displaying buffer for `popwin:display-buffer' and `popwin:special-display-popup-window'. The value is a list of CONFIG as a form of (PATTERN . KEYWORDS) where PATTERN is a pattern of specifying buffer and KEYWORDS is a list of a pair of key and value. PATTERN is in general a buffer name, a symbol specifying `major-mode' of buffer, or a predicate function which takes one argument: the buffer. If CONFIG is a string or a symbol, PATTERN will be CONFIG and KEYWORDS will be empty. Available keywords are following: regexp: If the value is non-nil, PATTERN will be used as regexp to matching buffer. width, height: Specify width or height of the popup window. If no size specified, `popwin:popup-window-width' or `popwin:popup-window-height' will be used. See also position keyword. position: The value must be one of (left top right bottom). The popup window will shown at the position of the frame. If no position specified, `popwin:popup-window-position' will be used. noselect: If the value is non-nil, the popup window will not be selected when it is shown. dedicated: If the value is non-nil, the popup window will be dedicated to the original popup buffer. In this case, when another buffer is selected in the popup window, the popup window will be closed immedicately and the selected buffer will be shown on the previously selected window. stick: If the value is non-nil, the popup window will be stuck when it is shown. tail: If the value is non-nil, the popup window will show the last contents. Examples: With '("*scratch*" :height 30 :position top), *scratch* buffer will be shown at the top of the frame with height 30. With '(dired-mode :width 80 :position left), dired buffers will be shown at the left of the frame with width 80. (custom-declare-variable 'popwin:special-display-config ''(("*Miniedit Help*" :noselect t) help-mode (completion-list-mode :noselect t) (compilation-mode :noselect t) (grep-mode :noselect t) (occur-mode :noselect t) ("*Pp Macroexpand Output*" :noselect t) "*Shell Command Output*" "*vc-diff*" "*vc-change-log*" (" *undo-tree*" :width 60 :position right) ("^\\*anything.*\\*$" :regexp t) "*slime-apropos*" "*slime-macroexpansion*" "*slime-description*" ("*slime-compilation*" :noselect t) "*slime-xref*" (sldb-mode :stick t) slime-repl-mode slime-connection-list-mode) '(#$ . 24628) :type '(repeat (cons :tag "Config" (choice :tag "Pattern" (string :tag "Buffer Name") (symbol :tag "Major Mode")) (plist :tag "Keywords" :value (:regexp nil) :options ((:regexp (boolean :tag "On/Off")) (:width (choice :tag "Width" (integer :tag "Width") (float :tag "Width (%)"))) (:height (choice :tag "Height" (integer :tag "Height") (float :tag "Height (%)"))) (:position (choice :tag "Position" (const :tag "Bottom" bottom) (const :tag "Top" top) (const :tag "Left" left) (const :tag "Right" right))) (:noselect (boolean :tag "On/Off")) (:dedicated (boolean :tag "On/Off")) (:stick (boolean :tag "On/Off")) (:tail (boolean :tag "On/Off")))))) :get #[(symbol) "\301\302\303!\"\207" [symbol mapcar #[(element) ":\203\207C\207" [element] 1] default-value] 4] :group 'popwin) #@53 Call FUNCTION on BUFFER without special displaying. (defalias 'popwin:apply-display-buffer #[(function buffer &optional not-this-window) "\306\307\310\"\311\312\n!!\206$ \313Y\205$\314\304!\205$\f:\205$\f@\315=\316 =\2034 \2044\317 \210) \313Y\203Q\314\304!\203Q\314\320!\203Q\n\f#\202W\n\"*\207" [display-buffer-alist display-buffer-function buffer emacs-major-version action same-window nil remove (popwin:display-buffer-condition popwin:display-buffer-action) same-window-p buffer-name 24 boundp display-buffer-same-window selected-window popwin:close-popup-window frame popwin:popup-window function not-this-window] 4 (#$ . 27856)]) #@61 Call `display-buffer' on BUFFER without special displaying. (defalias 'popwin:original-display-buffer #[(buffer &optional not-this-window) "\302\303 #\207" [buffer not-this-window popwin:apply-display-buffer display-buffer] 4 (#$ . 28523)]) #@60 Call `pop-to-buffer' on BUFFER without special displaying. (defalias 'popwin:original-pop-to-buffer #[(buffer &optional not-this-window) "\302\303 #\207" [buffer not-this-window popwin:apply-display-buffer pop-to-buffer] 4 (#$ . 28771)]) #@77 Call `display-buffer' for the last popup buffer without special displaying. (defalias 'popwin:original-display-last-buffer #[nil "\203 \301@!\207\302\303!\207" [popwin:popup-last-config popwin:original-display-buffer error "No popup buffer ever"] 2 (#$ . 29016) nil]) #@34 Switch to the last popup buffer. (defalias 'popwin:switch-to-last-buffer #[nil "\203\n\301\302@\"\207\303\304!\207" [popwin:popup-last-config popwin:apply-display-buffer #[(buffer &rest ignore) "\301!\207" [buffer switch-to-buffer] 2] error "No popup buffer ever"] 3 (#$ . 29293) nil]) #@76 Call `pop-to-buffer' for the last popup buffer without special displaying. (defalias 'popwin:original-pop-to-last-buffer #[nil "\203 \301@!\207\302\303!\207" [popwin:popup-last-config popwin:original-pop-to-buffer error "No popup buffer ever"] 2 (#$ . 29589) nil]) #@94 Return t if a window showing BUFFER-OR-NAME exists and should be used displaying the buffer. (defalias 'popwin:reuse-window-p #[(buffer-or-name not-this-window) "\205 \304 \305=?\205\"\211??\205\n \205\306 =?)\207" [popwin:reuse-window buffer-or-name window not-this-window get-buffer-window current selected-window] 5 (#$ . 29863)]) (defalias 'popwin:match-config #[(buffer) ";\203 \306!\307!\310\311\" \312\211\312\313\211\312\f:\203\241\f@\314 !\211\211A\242\211\313=\204\206;\203V\315\316\"\203V\317 \"\202\203;\203c \230\202\2039\203p\n=\202\203\320!\203~!\202\203\321\322\"\203\224B\312\211\202\225\313\203\241\fA\312\202%. \207" [buffer name mode popwin:special-display-config #1=#:--cl-var-- config get-buffer buffer-name buffer-local-value major-mode nil t popwin:listify plist-get :regexp string-match functionp error "Invalid pattern: %s" keywords pattern #2=#:--cl-var-- #3=#:--cl-var-- #4=#:--cl-var--] 4]) #@610 Display BUFFER-OR-NAME, if possible, in a popup window. Otherwise call IF-CONFIG-NOT-FOUND with BUFFER-OR-NAME if the value is a function. If IF-CONFIG-NOT-FOUND is nil, `popwin:popup-buffer' will be called. IF-BUFFER-NOT-FOUND indicates what happens when there is no such buffers. If the value is :create, create a new buffer named BUFFER-OR-NAME. If the value is :error, report an error. The default value is :create. DEFAULT-CONFIG-KEYWORDS is a property list which specifies default values of the config. (fn BUFFER-OR-NAME &key DEFAULT-CONFIG-KEYWORDS (IF-BUFFER-NOT-FOUND :create) IF-CONFIG-NOT-FOUND) (defalias 'popwin:display-buffer-1 #[(buffer-or-name &rest #1=#:--cl-rest--) "\306\307\"A@\306\310\"\206\311\312DA@\306\313\"A@\f\203G\f@\314>\2030\fAA\211\202\315>A@\203>\311\211\202\316\317\f@\"\210\202)\3202%\321 \n\"\"\322\"!\211#\204n \203k\323\320 \"!\"\210\202n\324#\325#A \"$\306$\326\"A@%\306$\327\"A@&\306$\330\"A@'\306$\331\"A@(\306$\332\"A@)\306$\333\"A@*\306$\334\"A@+\306$\335\"A@,$--\203\363-@\336>\203\331-AA\211-\202\304\315$>A@\203\351\311\211-\202\304\316\337-@\"\210\202\302)\340\"\327&\206\377.\330'\206/\331(\2060\332\341 \206)\333*\334+\335,&. 0+\207" [#1# default-config-keywords if-buffer-not-found if-config-not-found #2=#:--cl-keys-- buffer-or-name plist-member :default-config-keywords :if-buffer-not-found nil :create :if-config-not-found (:default-config-keywords :if-buffer-not-found :if-config-not-found . #3=(:allow-other-keys)) :allow-other-keys error "Keyword argument %s not one of (:default-config-keywords :if-buffer-not-found :if-config-not-found)" --cl-block-popwin:display-buffer-1-- popwin:get-buffer popwin:match-config throw (t) append :regexp :width :height :position :noselect :dedicated :stick :tail (:regexp :width :height :position :noselect :dedicated :stick :tail . #3#) "Keyword argument %s not one of (:regexp :width :height :position :noselect :dedicated :stick :tail)" popwin:popup-buffer popwin:minibuffer-window-selected-p buffer pattern-and-keywords #4=#:--cl-rest-- regexp width height position noselect dedicated stick tail #5=#:--cl-keys-- popwin:popup-window-width popwin:popup-window-height popwin:popup-window-position] 17 (#$ . 30877)]) #@137 Display BUFFER-OR-NAME, if possible, in a popup window, or as usual. This function can be used as a value of `display-buffer-function'. (defalias 'popwin:display-buffer #[(buffer-or-name &optional not-this-window) "\302 \"\203\f\303 \"\207\304\305\306 ?\205\307#\207" [buffer-or-name not-this-window popwin:reuse-window-p popwin:original-display-buffer popwin:display-buffer-1 :if-config-not-found called-interactively-p #[(buffer) "\302 \"\207" [buffer not-this-window popwin:original-display-buffer] 3]] 4 (#$ . 33178) "BDisplay buffer:\n"]) #@29 Obsolete (BUFFER) (IGNORE). (defalias 'popwin:special-display-popup-window #[(buffer &rest ignore) "\301!\207" [buffer popwin:display-buffer-1] 2 (#$ . 33735)]) #@66 (fn BUFFER &key DEFAULT-CONFIG-KEYWORDS OTHER-WINDOW NORECORD) (defalias 'popwin:pop-to-buffer-1 #[(buffer &rest #1=#:--cl-rest--) "\306\307\"A@\306\310\"A@\306\311\"A@\f\203A\f@\312>\203*\fAA\211\202\313>A@\2038\314\211\202\315\316\f@\"\210\202)\317 \307 \320\321%+\207" [#1# default-config-keywords other-window norecord #2=#:--cl-keys-- buffer plist-member :default-config-keywords :other-window :norecord (:default-config-keywords :other-window :norecord :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:default-config-keywords :other-window :norecord)" popwin:display-buffer-1 :if-config-not-found #[(buffer) "\303 \n#\207" [buffer other-window norecord pop-to-buffer] 4]] 7 (#$ . 33903)]) #@174 Same as `pop-to-buffer' except that this function will use `popwin:display-buffer-1' instead of `display-buffer'. BUFFER, OTHER-WINDOW amd NORECORD are the same arguments. (defalias 'popwin:pop-to-buffer #[(buffer &optional other-window norecord) "\303\304 \305\n%\207" [buffer other-window norecord popwin:pop-to-buffer-1 :other-window :norecord] 6 (#$ . 34660) (list (read-buffer "Pop to buffer: " (other-buffer)) (if current-prefix-arg t))]) #@103 Same as `popwin:special-display-config' except that this will be used for `popwin:universal-display'. (custom-declare-variable 'popwin:universal-display-config ''(t) '(#$ . 35114) :type 'list :group 'popwin) #@199 Call the following command interactively with letting `popwin:special-display-config' be `popwin:universal-display-config'. This will be useful when displaying buffers in popup windows temporarily. (defalias 'popwin:universal-display #[nil "\303\304\305\306\"!\307\n!*\207" [popwin:universal-display-config popwin:special-display-config command key-binding read-key-sequence "" t call-interactively] 4 (#$ . 35329) nil]) #@92 Delete other window than the popup window. C-g restores the original window configuration. (defalias 'popwin:one-window #[nil "\301 \302 \207" [popwin:window-config current-window-configuration delete-other-windows] 1 (#$ . 35759) nil]) #@90 Same as `popwin:popup-buffer' except that the buffer will be `recenter'ed at the bottom. (defalias 'popwin:popup-buffer-tail #[(&rest same-as-popwin:popup-buffer) "\211\203 \211A\242\202\303\304\305 GD\"\306\307\n\310\311 %*\207" [same-as-popwin:popup-buffer keyargs buffer signal wrong-number-of-arguments (buffer . keyargs) apply popwin:popup-buffer :tail t] 7 (#$ . 36003) "bPopup buffer:\n"]) #@64 Edit file FILENAME with popup window by `popwin:popup-buffer'. (defalias 'popwin:find-file #[(filename &optional wildcards) "\302\303 \"!\207" [filename wildcards popwin:popup-buffer find-file-noselect] 4 (#$ . 36414) (byte-code "\300\301\302\303!\205\n\303 \"\207" [find-file-read-args "Find file in popup window: " fboundp confirm-nonexistent-file-or-buffer] 4)]) #@69 Edit file FILENAME with popup window by `popwin:popup-buffer-tail'. (defalias 'popwin:find-file-tail #[(file &optional wildcard) "\302\303 \"!\207" [file wildcard popwin:popup-buffer-tail find-file-noselect] 4 (#$ . 36788) (byte-code "\300\301\302\303!\205\n\303 \"\207" [find-file-read-args "Find file in popup window: " fboundp confirm-nonexistent-file-or-buffer] 4)]) #@46 Display *Messages* buffer in a popup window. (defalias 'popwin:messages #[nil "\300\301!\207" [popwin:popup-buffer-tail "*Messages*"] 2 (#$ . 37167) nil]) #@35 Not documented (BUFFER) (ACTION). (defalias 'popwin:display-buffer-condition #[(buffer action) "\301!\205\302\207" [buffer popwin:match-config t] 2 (#$ . 37328)]) #@34 Not documented (BUFFER) (ALIST). (defalias 'popwin:display-buffer-action #[(buffer alist) "\303\304\"\305\n \")\207" [alist not-this-window buffer plist-get inhibit-same-window popwin:display-buffer] 3 (#$ . 37500)]) #@254 Non-nil if Popwin mode is enabled. See the `popwin-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 `popwin-mode'. (custom-declare-variable 'popwin-mode nil '(#$ . 37726) :set 'custom-set-minor-mode :initialize 'custom-initialize-default :type 'boolean) #@574 Minor mode for `popwin-mode'. This is a minor mode. If called interactively, toggle the `Popwin 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 'popwin-mode)'. The mode's hook is called both when the mode is enabled and when it is disabled. (defalias 'popwin-mode #[(&optional arg) "\306 \307\304 \310=\203\311\304!?\202\" \247\203! \312W\203!\313\202\"\314\"\210\315\302!\2039\316\304\n\"\311\304!\2039\304\nB\315\305!\203U\317\f\203L B\202Q\320 \")\202l!\203e!\321=\204e\322\323!\210\f\205j\321!\324\325\311\304!\203x\326\202y\327\"\210\330\331!\203\246\332\304!\210\306 \203\221\306 \232\203\246\333\"\334\335\311\304!\203\240\336\202\241\337\"#\210))\340 \210\311\304!\207" [#1=#:last-message arg global-minor-modes pair popwin-mode display-buffer-alist current-message set-default toggle default-value 1 nil t boundp delq (popwin:display-buffer-condition popwin:display-buffer-action) delete popwin:display-buffer warn "Overwriting display-buffer-function variable to enable/disable popwin-mode" run-hooks popwin-mode-hook popwin-mode-on-hook popwin-mode-off-hook called-interactively-p any customize-mark-as-set "" message "Popwin mode %sabled%s" "en" "dis" force-mode-line-update display-buffer-function local] 4 (#$ . 38125) (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 'toggle))]) (defvar popwin-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\313\300!\205#\310\211%\207" [popwin-mode-map popwin-mode-hook variable-documentation put "Hook run after entering or leaving `popwin-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 popwin-mode boundp] 6) #@866 Default keymap for popwin commands. Use like: (global-set-key (kbd "C-z") popwin:keymap) Keymap: | Key | Command | |--------+---------------------------------------| | b | popwin:popup-buffer | | l | popwin:popup-last-buffer | | o | popwin:display-buffer | | C-b | popwin:switch-to-last-buffer | | C-p | popwin:original-pop-to-last-buffer | | C-o | popwin:original-display-last-buffer | | SPC | popwin:select-popup-window | | s | popwin:stick-popup-window | | 0 | popwin:close-popup-window | | f, C-f | popwin:find-file | | e | popwin:messages | | C-u | popwin:universal-display | | 1 | popwin:one-window | (defvar popwin: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\302\327\326#\210\302\330\331#\210\302\332\333#\210\302\334\335#\210)\207" [map make-sparse-keymap define-key "b" popwin:popup-buffer "l" popwin:popup-last-buffer "o" popwin:display-buffer "" popwin:switch-to-last-buffer "" popwin:original-pop-to-last-buffer "" popwin:original-display-last-buffer " " popwin:select-popup-window "s" popwin:stick-popup-window "0" popwin:close-popup-window "f" popwin:find-file "" "e" popwin:messages "" popwin:universal-display "1" popwin:one-window] 4) (#$ . 40295)) (provide 'popwin)