-
Notifications
You must be signed in to change notification settings - Fork 2
/
popup.elc
executable file
·240 lines (224 loc) · 66.3 KB
/
popup.elc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
;ELC
;;; Compiled by [email protected] on Sun Dec 16 17:19:07 2012
;;; from file /home/work/tmp/auto-complete-1.3.1/popup.el
;;; in Emacs version 24.2.1
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#@88 Use optimized column computation routine.
If there is a problem, please set it to nil.
(defvar popup-use-optimized-column-computation t (#$ . 522))(if macro-declaration-function (funcall macro-declaration-function (quote popup-aif) (quote (declare (indent 2)))))
#@67 Anaphoric if. Temporary variable `it' is the result of test-form.
(defalias 'popup-aif '(macro . #[(test-form then-form &rest else-forms) "\303\304DC\305\304 \nBBBE\207" [test-form then-form else-forms let it if] 6 (#$ . 791)]))
#@94 Convert any object to string effeciently.
This is faster than prin1-to-string in many cases.
(defalias 'popup-x-to-string #[(x) ";\203 \2079\203 \302!\207\250\203 \303!\207\211\247\205# \250?)\203+ \303!\207\304\305\"\207" [x object symbol-name number-to-string format "%s"] 4 (#$ . 1027)])
#@59 Return cons of substring and remaining string by `WIDTH'.
(defalias 'popup-substring-by-width #[(string width) "\306\307\310#\211G\311\211\312\313\"\313\f:\2033 \f@\n\314!\\\211X\2033 T\fA\211\202 W\203E \311O\313OB\202G C-\207" [string len w l #1=#:--cl-var-- c replace-regexp-in-string " " " " 0 append nil char-width width] 5 (#$ . 1338)])
#@726 Split STRING into fixed width strings and return a cons cell like
(WIDTH . ROWS). Here, the car WIDTH indicates the actual maxim width of ROWS.
The argument WIDTH specifies the width of filling each paragraph. WIDTH nil
means don't perform any justification and word wrap. Note that this function
doesn't add any padding characters at the end of each row.
MAX-WIDTH, if WIDTH is nil, specifies the maximum number of columns.
The optional fourth argument JUSTIFY specifies which kind of justification
to do: `full', `left', `right', `center', or `none' (equivalent to nil).
A value of t means handle each paragraph as specified by its text properties.
SQUEEZE nil means leave whitespaces other than line breaks untouched.
(defalias 'popup-fill-string #[(string &optional width max-width justify squeeze) "\306=\203\n \307\310!\210\203 \311\312!r\nq\210\313\216\314\306\315\316\211\211c\210\317ed\"\210\203C \320ed?$\210eb\210\306`\316\210`{ \203| \321 \"\322\f!]\fB\fGGU\204\210 \fG\316O\211\204T \202\210 \322!]B)`dW\323\324!\210\204H \237.\nB\207" [width max-width #1=#:temp-buffer rows row indent-tabs-mode 0 error "Can't fill string with 0 width" generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) 4 1 nil untabify fill-region truncate-string-to-width string-width beginning-of-line 2 kinsoku-limit left-margin fill-column tab-width string justify squeeze line] 7 (#$ . 1715)])(if macro-declaration-function (funcall macro-declaration-function (quote popup-save-buffer-state) (quote (declare (indent 0)))))
(defalias 'popup-save-buffer-state '(macro . #[(&rest body) "\301\302\303\304\305B\306BBED\207" [body save-excursion let ((buffer-undo-list t) (buffer-read-only nil) (modified (buffer-modified-p))) unwind-protect progn ((set-buffer-modified-p modified))] 6]))
#@61 Return preferred width of popup to show `LIST' beautifully.
(defalias 'popup-preferred-width #[(list) "\306 \307\211\307\211\n:\203X \n@\211\310\304\")\311\312!!\203/ ]\2021 )\f;\203Q \311\f!\313\\\203L ]\202N )\nA\211\202 \314\206^ \315\206d \315\\\316\245!\317_.\207" [tab-width list #1=#:--cl-var-- item summary width 4 nil popup-item-property string-width popup-x-to-string 2 ceiling 0 10.0 10 summary-width #2=#:--cl-var-- #3=#:--cl-var--] 4 (#$ . 3607)])
(defalias 'popup-window-full-width-p #[(&optional window) "\301\302!\203\n \302!\207\303!\304\305\206 \306 !!U\207" [window fboundp window-full-width-p window-width frame-width window-frame selected-window] 4])
(defalias 'popup-truncated-partial-width-window-p #[(&optional window) "\204 \302 \303!?\205$ \304\305\306!\"\211\250\203\"