mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-18 c655eea759be1db69c5e6b45c228139d8390122a
commit | author | age
5cb5f7 1 ;ELC
C 2 ;;; Compiled
3 ;;; in Emacs version 26.1
4 ;;; with all optimizations.
5
6 ;;; This file uses dynamic docstrings, first added in Emacs 19.29.
7
8 ;;; This file does not contain utf-8 non-ASCII characters,
9 ;;; and so can be loaded in Emacs versions earlier than 23.
10
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
14
15 (defconst popwin:version "1.0.0")
16 #@82 Return a singleton list of OBJECT if OBJECT is an atom,
17 otherwise OBJECT itself.
18 (defalias 'popwin:listify #[(object) ":\204C\207\207" [object] 1 (#$ . 442)])
19 (defalias 'popwin:subsitute-in-tree #[(map tree) ":\203\302    @\"\302    A\"B\207    \236A\206\207" [tree map popwin:subsitute-in-tree] 4])
20 #@332 Return a buffer named BUFFER-OR-NAME or BUFFER-OR-NAME itself
21 if BUFFER-OR-NAME is a buffer. If BUFFER-OR-NAME is a string and
22 such a buffer named BUFFER-OR-NAME not found, a new buffer will
23 be returned when IF-NOT-FOUND is :create, or an error reported
24 when IF-NOT-FOUND is :error. The default of value of IF-NOT-FOUND
25 is :error.
26 (defalias 'popwin:get-buffer #[(buffer-or-name &optional if-not-found) "\206\303\304    \305\"\203\306\n!\2020\304    \303\"\203'\307\n!\2060\310\311\n\"\2020\310\312    \313#\2050\314)\207" [if-not-found #1=#:temp buffer-or-name :error eql :create get-buffer-create get-buffer error "No buffer named %s" "cl-ecase failed: %s, %s" (:create :error) nil] 4 (#$ . 754)])
27 #@85 Call `switch-to-buffer' forcing BUFFER-OF-NAME be displayed in
28 the selected window.
29 (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 (#$ . 1461)])
30 #@54 Call `select-window' with saving the current buffer.
31 (defalias 'popwin:select-window #[(window &optional norecord) "r\302    \")\207" [window norecord select-window] 3 (#$ . 1753)])
32 #@60 Return t if BUFFER might be thought of as a buried buffer.
33 (defalias 'popwin:buried-buffer-p #[(buffer) "\301\302 !@=\207" [buffer last buffer-list] 2 (#$ . 1939)])
34 #@99 Return window-point of WINDOW. If WINDOW is currently
35 selected, then return buffer-point instead.
36 (defalias 'popwin:window-point #[(window) "\301 =\203r\302!q\210`)\207\303!\207" [window selected-window window-buffer window-point] 2 (#$ . 2111)])
37 #@129 Return t if WINDOW is deletable, meaning that WINDOW is alive
38 and not a minibuffer's window, plus there is two or more windows.
39 (defalias 'popwin:window-deletable-p #[(window) "\301!\205\302!?\205\303 ?\207" [window window-live-p window-minibuffer-p one-window-p] 2 (#$ . 2370)])
40 #@43 Evaluate BODY saving the selected window.
41 (defalias 'popwin:save-selected-window '(macro . #[(&rest body) "\301\302BB\207" [body with-selected-window (selected-window)] 3 (#$ . 2662)]))
42 #@44 Return t if minibuffer window is selected.
43 (defalias 'popwin:minibuffer-window-selected-p #[nil "\300\301 !\207" [minibuffer-window-active-p selected-window] 2 (#$ . 2855)])
44 #@94 Return currently selected window or lastly selected window if
45 minibuffer window is selected.
46 (defalias 'popwin:last-selected-window #[nil "\300 \203\301 \207\302 \207" [popwin:minibuffer-window-selected-p minibuffer-selected-window selected-window] 1 (#$ . 3035)])
47 (defvar popwin:debug nil)
48 (defvar popwin:dummy-buffer nil)
49 (defalias 'popwin:dummy-buffer #[nil "\301!\203\207\302\303!\211\207" [popwin:dummy-buffer buffer-live-p get-buffer-create " *popwin-dummy*"] 2])
50 (defalias 'popwin:kill-dummy-buffer #[nil "\301!\203\n\302!\210\303\211\207" [popwin:dummy-buffer buffer-live-p kill-buffer nil] 2])
51 #@54 Return t if a trailing edge of WINDOW is adjustable.
52 (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 (#$ . 3655)])
53 #@154 Adjust edges of WINDOW to EDGES accoring to horizontal factor
54 HFACTOR, and vertical factor VFACTOR.
55
56 (fn WINDOW EDGES &optional (HFACTOR 1) (VFACTOR 1))
57 (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\375\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@ @\211G\312U\203\225\211A\242\202\235\307\310\316GD\"\211A\242\211A\242@\317Z    _ZZ!\317Z\n_ZZ!\3201\346\321 \322#0\202\352\210\202\353\210\3231\371\321 \316#0\202\373\210\316. *\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 nil floor (error) adjust-window-trailing-edge t (error) #3=#:--cl-rest-- left top right bottom #4=#:--cl-rest-- cur-left cur-top cur-right cur-bottom vdelta hdelta] 6 (#$ . 3913)])
58 (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    \317\211\f:\203j\f@\306 !\203[\321 \322\"\204c\323 !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 nil append window-parameter window-side popwin:window-config-tree-1 #2=#:--cl-var--] 10])
59 #@96 Return `window-tree' with replacing window values in the tree
60 with persistent representations.
61 (defalias 'popwin:window-config-tree #[nil "\303 \211G\304U\203\211A\242\202\305\306\307GD\"@\310    !\n+D\207" [#1=#:--cl-rest-- root mini window-tree 2 signal wrong-number-of-arguments nil popwin:window-config-tree-1] 5 (#$ . 5551)])
62 #@192 Replicate NODE of window configuration on WINDOW with
63 horizontal factor HFACTOR, and vertical factor VFACTOR. The
64 return value is a association list of mapping from old-window to
65 new-window.
66 (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    @\313\312\"\210\314$\210\315!r\316\216\317@\320\"\210\321 \322\"\210+\203v\323!\210\324\f\"\210\325 \322#\210\203\216\313\322\"\210\n.BC\207\211A\203\250\211A\242\202\260\310\311\312GD\" \211A\242\312\211!\"\312\211#$\322%\203\f\211A\242!%\203\342\202\344#\"\205\363\326\"\312 ?##\327\330\"!$!$\244$\312%\202\312$\237.\207" [node #1=#:--cl-rest-- old-win buffer point start window 7 signal wrong-number-of-arguments nil set-window-dedicated-p 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 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 (#$ . 5897)])
67 #@152 Restore window outline accoding to the structures of NODE
68 which is a node of `window-tree' and OUTLINE which is a node of
69 `popwin:window-config-tree'.
70 (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@\314\"\210\315!\f=\205g\316! =\205g\317\".\207\306!\206\307@    @=?\206\307AA    AA\211GG=\205\306\313\313:\203\304@:\203\304@\320\"\210AA\202\232,\313*\207" [node outline #1=#:--cl-rest-- old-win buffer point windowp window 7 signal wrong-number-of-arguments nil popwin:adjust-window-edges window-buffer popwin:window-point set-window-start popwin:restore-window-outline start edges selected dedicated child-outlines child-nodes #2=#:--cl-var-- child-node #3=#:--cl-var-- child-outline] 5 (#$ . 7299)])
71 #@37 Return t if POSITION is hozirontal.
72 (defalias 'popwin:position-horizontal-p #[(position) "\301>\205\302\207" [position (left :left right :right) t] 2 (#$ . 8229)])
73 #@35 Return t if POSITION is vertical.
74 (defalias 'popwin:position-vertical-p #[(position) "\301>\205\302\207" [position (top :top bottom :bottom) t] 2 (#$ . 8402)])
75 #@122 Create a new window with SIZE at POSITION of WINDOW. The
76 return value is a list of a master window and the popup window.
77 (defalias 'popwin:create-popup-window-1 #[(window size position) "\305!\306!\307 \310\"\203\311\f\312#D\202Y\307 \313\"\203*\311\f\314#D\202Y\307 \315\"\203=\311\n\fZ\312#D\202Y\307 \316\"\203P\311    \fZ\314#D\202Y\317\320 \321#\205Y\314*\207" [window height width position size window-width window-height memql (left :left) split-window t (top :top) nil (right :right) (bottom :bottom) error "cl-ecase failed: %s, %s" (:left left :top top :right right :bottom bottom)] 5 (#$ . 8572)])
78 #@639 Create a popup window with SIZE on the frame.  If SIZE
79 is integer, the size of the popup window will be SIZE. If SIZE is
80 float, the size of popup window will be a multiplier of SIZE and
81 frame-size. can be an integer and a float. If ADJUST is t, all of
82 windows will be adjusted to fit the frame. POSITION must be one
83 of (left top right bottom). The return value is a pair of a
84 master window and the popup window. To close the popup window
85 properly, get `current-window-configuration' before calling this
86 function, and call `set-window-configuration' with the
87 window-configuration.
88
89 (fn &optional (SIZE 15) (POSITION \='bottom) (ADJUST t))
90 (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\334    Z&\333(    _!\202\261\331\n!\203\246\335)    Z!)\245%\202\261\335(    Z!(\245&\336     \n#\211*G\337U\203\311*\211A*\242\202\321\311\312\340*GD\"+*@,\320,!'r\341\216\323'@\324\"\210\342\343 \310\"\210+\344+\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 1.0 float popwin:create-popup-window-1 2 nil #[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 (#$ . 9206)])
91 (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\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. This must be one of (left top right\nbottom)." :type symbol popwin:popup-window-width 30 "Default popup window width. If `popwin:popup-window-position'\nis top or bottom, this configuration will be ignored. If this\nvariable is float, the popup window width will be a multiplier of\nthe value and frame-size." number popwin:popup-window-height 15 "Default popup window height. If `popwin:popup-window-position'\nis left or right, this configuration will be ignored. If this\nvariable is float, the popup window height will be a multiplier\nof the value and frame-size." popwin:reuse-window 'current "Non-nil means `popwin:display-buffer' will not popup the\nvisible buffer.  The value is same as a second argument of\n`get-buffer-window', except `current' means the selected frame." popwin:adjust-other-windows t "Non-nil means all of other windows will be adjusted to fit the\nframe when a popup window is shown." boolean] 8)
92 (defvar popwin:context-stack nil)
93 #@29 Main popup window instance.
94 (defvar popwin:popup-window nil (#$ . 12594))
95 #@48 Buffer of currently shown in the popup window.
96 (defvar popwin:popup-buffer nil (#$ . 12674))
97 #@50 Arguments to `popwin:popup-buffer' of last call.
98 (defvar popwin:popup-last-config nil (#$ . 12773))
99 #@34 Master window of a popup window.
100 (defvar popwin:master-window nil (#$ . 12879))
101 #@81 Focused window which is used to check whether or not to close
102 the popup window.
103 (defvar popwin:focus-window nil (#$ . 12965))
104 #@54 Last selected window when the popup window is shown.
105 (defvar popwin:selected-window nil (#$ . 13097))
106 #@75 Non-nil means the popup window is dedicated to the original
107 popup buffer.
108 (defvar popwin:popup-window-dedicated-p nil (#$ . 13205))
109 #@48 Non-nil means the popup window has been stuck.
110 (defvar popwin:popup-window-stuck-p nil (#$ . 13343))
111 #@75 Original window outline which is obtained by
112 `popwin:window-config-tree'.
113 (defvar popwin:window-outline nil (#$ . 13450))
114 #@42 Mapping from old windows to new windows.
115 (defvar popwin:window-map nil (#$ . 13578))
116 #@50 An original window configuration for restoreing.
117 (defvar popwin:window-config nil (#$ . 13669))
118 #@36 Timer of closing the popup window.
119 (defvar popwin:close-popup-window-timer nil (#$ . 13771))
120 #@48 Interval of `popwin:close-popup-window-timer'.
121 (defvar popwin:close-popup-window-timer-interval 0.05 (#$ . 13870))
122 (defvar popwin:before-popup-hook nil)
123 (defvar popwin:after-popup-hook nil)
124 (defalias 'popwin:valid-context-p #[(context) "\301\302\303\"!\207" [context window-live-p plist-get popwin:popup-window] 4])
125 (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])
126 (defalias 'popwin:use-context #[(context) "\303\211\n\211A\242\n\211A\242\203    L\210\202*\303\207" [var val context nil] 3])
127 (defalias 'popwin:push-context #[nil "\301 B\211\207" [popwin:context-stack popwin:current-context] 2])
128 (defalias 'popwin:pop-context #[nil "\301\211A\242!\207" [popwin:context-stack popwin:use-context] 3])
129 #@31 
130
131 (fn BUFFER &key VALID-ONLY)
132 (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\312\f\211A\242\211\203l\316 \317\"=\203h    \203\\\320 !\203h \fD\312\211\202i\315\204>-\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-- buffer] 5 (#$ . 14899)])
133 #@45 Return t if `popwin:popup-window' is alive.
134 (defalias 'popwin:popup-window-live-p #[nil "\301!\207" [popwin:popup-window window-live-p] 2 (#$ . 15555)])
135 #@59 
136
137 (fn SYMBOL &key (MAP popwin:window-map) SAFE RECURSIVE)
138 (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 (#$ . 15715)])
139 (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])
140 (defalias 'popwin:stop-close-popup-window-timer #[nil "\205 \301!\210\302\211\207" [popwin:close-popup-window-timer cancel-timer nil] 2])
141 (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])
142 #@152 Close the popup window and restore to the previous window
143 configuration. If KEEP-SELECTED is non-nil, the lastly selected
144 window will not be selected.
145 (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 (#$ . 16927) nil])
146 #@332 Close the popup window if necessary. The all situations where
147 the popup window will be closed are followings:
148
149 * `C-g' has been pressed.
150 * The popup buffer has been killed.
151 * The popup buffer has been buried.
152 * The popup buffer has been changed if the popup window is
153   dedicated to the buffer.
154 * Another window has been selected.
155 (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 (#$ . 17621)])
156 #@546 Show BUFFER in a popup window and return the popup window. If
157 NOSELECT is non-nil, the popup window will not be selected. If
158 STICK is non-nil, the popup window will be stuck. If TAIL is
159 non-nil, the popup window will show the last contents. Calling
160 `popwin:popup-buffer' during `popwin:popup-buffer' is allowed. In
161 that case, the buffer of the popup window will be replaced with
162 BUFFER.
163
164 (fn BUFFER &key (WIDTH popwin:popup-window-width) (HEIGHT popwin:popup-window-height) (POSITION popwin:popup-window-position) NOSELECT DEDICATED STICK TAIL)
165 (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@/\306\313\"A@0\306\314\"A@1\306\315\"A@2\306\316\"A@344\203{4@\317>\203b4AA\2114\202M\320>A@\203q\310\2114\202M\321\3224@\"\210\202K)\3235!5\324 \210\325\326!\210\3275\330\331#\2116@76A@87\203\254\3327!\2108#\202c\333 @9\334/!\203\274\n\202\275\f:;<\335</;#*\211=G\336U\203\337=\211A=\242\202\347\337\340\310=GD\">=\211A=\242?=@@?A>B9C@D\310E\341 F,\342\343\344\331#\210\345 \210)\346A!Gr\347\216\350G@\351\"\210\3525!\2103\203=\353Ad\"\210\354\355!\210+5H5\307\n\311\f\312/\3130\3141\3152\3163\257I1J2K+0\203pFL\202yAL\350A!\210\325\356!\210A.\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 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 (#$ . 19681) "BPopup buffer:\n"])
166 #@120 Show the last popup buffer with the same configuration. If
167 NOSELECT is non-nil, the popup window will not be selected.
168 (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 nil apply popwin:popup-buffer :noselect t error "No popup buffer ever"] 7 (#$ . 22506) "P"])
169 (defalias 'popwin:display-last-buffer 'popwin:popup-last-buffer)
170 #@42 Select the currently shown popup window.
171 (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 (#$ . 23050) nil])
172 #@104 Stick the currently shown popup window. The popup window can
173 be closed by `popwin:close-popup-window'.
174 (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 (#$ . 23297) nil])
175 #@43 Evaluate BODY without special displaying.
176 (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 (#$ . 23637)]))
177 #@1849 Configuration of special displaying buffer for
178 `popwin:display-buffer' and
179 `popwin:special-display-popup-window'. The value is a list of
180 CONFIG as a form of (PATTERN . KEYWORDS) where PATTERN is a
181 pattern of specifying buffer and KEYWORDS is a list of a pair of
182 key and value. PATTERN is in general a buffer name, a symbol
183 specifying major-mode of buffer, or a predicate function which
184 takes one argument: the buffer. If CONFIG is a string or a
185 symbol, PATTERN will be CONFIG and KEYWORDS will be
186 empty. Available keywords are following:
187
188   regexp: If the value is non-nil, PATTERN will be used as regexp
189     to matching buffer.
190
191   width, height: Specify width or height of the popup window. If
192     no size specified, `popwin:popup-window-width' or
193     `popwin:popup-window-height' will be used. See also position
194     keyword.
195
196   position: The value must be one of (left top right bottom). The
197     popup window will shown at the position of the frame.  If no
198     position specified, `popwin:popup-window-position' will be
199     used.
200
201   noselect: If the value is non-nil, the popup window will not be
202     selected when it is shown.
203
204   dedicated: If the value is non-nil, the popup window will be
205     dedicated to the original popup buffer. In this case, when
206     another buffer is selected in the popup window, the popup
207     window will be closed immedicately and the selected buffer
208     will be shown on the previously selected window.
209
210   stick: If the value is non-nil, the popup window will be stuck
211     when it is shown.
212
213   tail: If the value is non-nil, the popup window will show the
214     last contents.
215
216 Examples: With '("*scratch*" :height 30 :position top),
217 *scratch* buffer will be shown at the top of the frame with
218 height 30. With '(dired-mode :width 80 :position left), dired
219 buffers will be shown at the left of the frame with width 80.
220 (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) '(#$ . 24070) :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)
221 #@53 Call FUNCTION on BUFFER without special displaying.
222 (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 (#$ . 27288)])
223 #@61 Call `display-buffer' on BUFFER without special displaying.
224 (defalias 'popwin:original-display-buffer #[(buffer &optional not-this-window) "\302\303    #\207" [buffer not-this-window popwin:apply-display-buffer display-buffer] 4 (#$ . 27955)])
225 #@60 Call `pop-to-buffer' on BUFFER without special displaying.
226 (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 (#$ . 28203)])
227 #@77 Call `display-buffer' for the last popup buffer without
228 special displaying.
229 (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 (#$ . 28448) nil])
230 #@34 Switch to the last popup buffer.
231 (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 (#$ . 28725) nil])
232 #@76 Call `pop-to-buffer' for the last popup buffer without
233 special displaying.
234 (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 (#$ . 29021) nil])
235 #@94 Return t if a window showing BUFFER-OR-NAME exists and should
236 be used displaying the buffer.
237 (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 (#$ . 29295)])
238 (defalias 'popwin:match-config #[(buffer) ";\203    \306!\307!\310\311\" \312\211\312\313\312\f:\203\234\f@\314 !\211\211A\242\211\313=\204\203;\203S\315\316\"\203S\317    \"\202\200;\203`    \230\202\2009\203m\n=\202\200\320!\203{!\202\200\321\322\"\203\221B\312\211\202\222\313\203\234\fA\211\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])
239 #@610 Display BUFFER-OR-NAME, if possible, in a popup
240 window. Otherwise call IF-CONFIG-NOT-FOUND with BUFFER-OR-NAME if
241 the value is a function. If IF-CONFIG-NOT-FOUND is nil,
242 `popwin:popup-buffer' will be called. IF-BUFFER-NOT-FOUND
243 indicates what happens when there is no such buffers. If the
244 value is :create, create a new buffer named BUFFER-OR-NAME. If
245 the value is :error, report an error. The default value
246 is :create. DEFAULT-CONFIG-KEYWORDS is a property list which
247 specifies default values of the config.
248
249 (fn BUFFER-OR-NAME &key DEFAULT-CONFIG-KEYWORDS (IF-BUFFER-NOT-FOUND :create) IF-CONFIG-NOT-FOUND)
250 (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 (#$ . 30285)])
251 #@137 Display BUFFER-OR-NAME, if possible, in a popup window, or as
252 usual. This function can be used as a value of
253 `display-buffer-function'.
254 (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 (#$ . 32586) "BDisplay buffer:\n"])
255 #@11 Obsolete.
256 (defalias 'popwin:special-display-popup-window #[(buffer &rest ignore) "\301!\207" [buffer popwin:display-buffer-1] 2 (#$ . 33143)])
257 #@66 
258
259 (fn BUFFER &key DEFAULT-CONFIG-KEYWORDS OTHER-WINDOW NORECORD)
260 (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 (#$ . 33293)])
261 #@115 Same as `pop-to-buffer' except that this function will use
262 `popwin:display-buffer-1' instead of `display-buffer'.
263 (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 (#$ . 34050) (list (read-buffer "Pop to buffer: " (other-buffer)) (if current-prefix-arg t))])
264 #@103 Same as `popwin:special-display-config' except that this will
265 be used for `popwin:universal-display'.
266 (custom-declare-variable 'popwin:universal-display-config ''(t) '(#$ . 34445) :group 'popwin)
267 #@199 Call the following command interactively with letting
268 `popwin:special-display-config' be
269 `popwin:universal-display-config'. This will be useful when
270 displaying buffers in popup windows temporarily.
271 (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 (#$ . 34648) nil])
272 #@92 Delete other window than the popup window. C-g restores the
273 original window configuration.
274 (defalias 'popwin:one-window #[nil "\301 \302 \207" [popwin:window-config current-window-configuration delete-other-windows] 1 (#$ . 35078) nil])
275 #@90 Same as `popwin:popup-buffer' except that the buffer will be
276 `recenter'ed at the bottom.
277 (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 nil apply popwin:popup-buffer :tail t] 7 (#$ . 35322) "bPopup buffer:\n"])
278 #@64 Edit file FILENAME with popup window by `popwin:popup-buffer'.
279 (defalias 'popwin:find-file #[(filename &optional wildcards) "\302\303    \"!\207" [filename wildcards popwin:popup-buffer find-file-noselect] 4 (#$ . 35718) (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)])
280 #@69 Edit file FILENAME with popup window by
281 `popwin:popup-buffer-tail'.
282 (defalias 'popwin:find-file-tail #[(file &optional wildcard) "\302\303    \"!\207" [file wildcard popwin:popup-buffer-tail find-file-noselect] 4 (#$ . 36092) (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)])
283 #@46 Display *Messages* buffer in a popup window.
284 (defalias 'popwin:messages #[nil "\300\301!\207" [popwin:popup-buffer-tail "*Messages*"] 2 (#$ . 36471) nil])
285 (defalias 'popwin:display-buffer-condition #[(buffer action) "\301!\205\302\207" [buffer popwin:match-config t] 2])
286 (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])
287 #@254 Non-nil if Popwin mode is enabled.
288 See the `popwin-mode' command
289 for a description of this minor mode.
290 Setting this variable directly does not take effect;
291 either customize it (see the info node `Easy Customization')
292 or call the function `popwin-mode'.
293 (custom-declare-variable 'popwin-mode nil '(#$ . 36925) :set 'custom-set-minor-mode :initialize 'custom-initialize-default :group 'popwin :type 'boolean)
294 #@2 
295 (defalias 'popwin-mode #[(&optional arg) "\306 \307\303    \310=\203\311\303!?\202\312    !\313V\"\210\314\304!\2035\315 \203,\n\fB\2021\316\n\f\")\202I \203C \317=\204C\320\321!\210 \205H\317\322\323\311\303!\203U\324\202V\325\"\210\326\327!\203\203\330\303!\210\306 \203n\306 \232\203\203\331\332\333\311\303!\203}\334\202~\335#\210))\336 \210\311\303!\207" [#1=#:last-message arg pair popwin-mode display-buffer-alist display-buffer-function current-message set-default toggle default-value prefix-numeric-value 0 boundp (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 local] 4 (#$ . 37337) (list (or current-prefix-arg 'toggle))])
296 (defvar popwin-mode-hook nil)
297 (byte-code "\301\302N\204\f\303\301\302\304#\210\305\306\307\310\300!\205\307\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.)" add-minor-mode popwin-mode nil boundp] 6)
298 #@865 Default keymap for popwin commands. Use like:
299 (global-set-key (kbd "C-z") popwin:keymap)
300
301 Keymap:
302
303 | Key    | Command                               |
304 |--------+---------------------------------------|
305 | b      | popwin:popup-buffer                   |
306 | l      | popwin:popup-last-buffer              |
307 | o      | popwin:display-buffer                 |
308 | C-b    | popwin:switch-to-last-buffer          |
309 | C-p    | popwin:original-pop-to-last-buffer    |
310 | C-o    | popwin:original-display-last-buffer   |
311 | SPC    | popwin:select-popup-window            |
312 | s      | popwin:stick-popup-window             |
313 | 0      | popwin:close-popup-window             |
314 | f, C-f | popwin:find-file                      |
315 | e      | popwin:messages                       |
316 | C-u    | popwin:universal-display              |
317 | 1      | popwin:one-window                     |
318 (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) (#$ . 38718))
319 (provide 'popwin)