Update icicles
[emacs.git] / .emacs.d / elisp / icicle / icicles-var.el
1 ;;; icicles-var.el --- Internal variables for Icicles
2 ;;
3 ;; Filename: icicles-var.el
4 ;; Description: Internal variables for Icicles
5 ;; Author: Drew Adams
6 ;; Maintainer: Drew Adams (concat "drew.adams" "@" "oracle" ".com")
7 ;; Copyright (C) 1996-2015, Drew Adams, all rights reserved.
8 ;; Created: Mon Feb 27 09:23:26 2006
9 ;; Last-Updated: Thu Jan 1 10:56:31 2015 (-0800)
10 ;; By: dradams
11 ;; Update #: 1822
12 ;; URL: http://www.emacswiki.org/icicles-var.el
13 ;; Doc URL: http://www.emacswiki.org/Icicles
14 ;; Keywords: internal, extensions, help, abbrev, local, minibuffer,
15 ;; keys, apropos, completion, matching, regexp, command
16 ;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x, 24.x, 25.x
17 ;;
18 ;; Features that might be required by this library:
19 ;;
20 ;; `apropos', `apropos+', `apropos-fn+var', `avoid', `bookmark',
21 ;; `bookmark+', `bookmark+-1', `bookmark+-bmu', `bookmark+-key',
22 ;; `bookmark+-lit', `cl', `cmds-menu', `cus-theme',
23 ;; `el-swank-fuzzy', `ffap', `ffap-', `fit-frame', `frame-fns',
24 ;; `fuzzy', `fuzzy-match', `help+20', `hexrgb', `icicles-opt',
25 ;; `info', `info+20', `kmacro', `levenshtein', `menu-bar',
26 ;; `menu-bar+', `misc-cmds', `misc-fns', `naked', `package', `pp',
27 ;; `pp+', `regexp-opt', `second-sel', `strings', `thingatpt',
28 ;; `thingatpt+', `unaccent', `w32browser-dlgopen', `wid-edit',
29 ;; `wid-edit+', `widget'.
30 ;;
31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
32 ;;
33 ;;; Commentary:
34 ;;
35 ;; This is a helper library for library `icicles.el'. It defines
36 ;; internal variables (not to be modified by users. For Icicles
37 ;; documentation, see `icicles-doc1.el' and `icicles-doc2.el'.
38 ;;
39 ;; Internal variables defined here:
40 ;;
41 ;; `icicle-abs-file-candidates', `icicle-acting-on-next/prev',
42 ;; `icicle-advice-info-list', `icicle-all-candidates-action',
43 ;; `icicle-all-candidates-list-action-fn',
44 ;; `icicle-all-candidates-list-alt-action-fn',
45 ;; `icicle-allowed-sort-predicate', `icicle-apply-nomsg',
46 ;; `icicle-apropos-complete-match-fn',
47 ;; `icicle-apropos-value-last-initial-cand-set',
48 ;; `icicle-auto-no-icomplete-mode-p', `icicle-auto-no-sort-p',
49 ;; `icicle-bookmark-history', `icicle-bookmark-list-names-only-p',
50 ;; `icicle-bookmark-types', `icicle-buffer-complete-fn',
51 ;; `icicle-buffer-config-history', `icicle-buffer-name-input-p',
52 ;; `icicle-buffer-sort-first-time-p', `icicle-bufflist',
53 ;; `icicle-candidate-action-fn', `icicle-candidate-alt-action-fn',
54 ;; `icicle-candidate-entry-fn', `icicle-candidate-help-fn',
55 ;; `icicle-candidate-nb', `icicle-candidate-properties-alist',
56 ;; `icicle-candidates-alist', `icicle-cands-to-narrow',
57 ;; `icicle-char-property-value-history',
58 ;; `icicle-cmd-calling-for-completion', `icicle-cmd-reading-input',
59 ;; `icicle-color-history', `icicle-color-theme-history',
60 ;; `icicle-command-abbrev-history', `icicle-commands-for-abbrev',
61 ;; `icicle-common-match-string',
62 ;; `icicle-comp-base-is-default-dir-p',
63 ;; `icicle-complete-input-overlay', `icicle-complete-keys-alist',
64 ;; `icicle-completing-keys-p', `icicle-completing-p',
65 ;; `icicle-completing-read+insert-candidates',
66 ;; `icicle-completion-candidates', `icicle-completion-map-vars',
67 ;; `icicle-completion-prompt-overlay',
68 ;; `icicle-completion-set-history',
69 ;; `icicle-compute-narrowing-regexp-p',
70 ;; `icicle-confirm-exit-commands',
71 ;; `icicle-current-completion-candidate-overlay',
72 ;; `icicle-current-completion-mode',
73 ;; `icicle-current-font-lock-part', `icicle-current-input',
74 ;; `icicle-current-raw-input', `icicle-cycling-p',
75 ;; `icicle-default-thing-insertion-flipped-p',
76 ;; `icicle-dictionary-history', `icicle-dir-candidate-can-exit-p',
77 ;; `icicle-doc-last-initial-cand-set',
78 ;; `icicle-dot-string-internal', `icicle-edit-update-p',
79 ;; `icicle-ess-use-ido', `icicle-exclude-default-proxies',
80 ;; `icicle-explore-final-choice',
81 ;; `icicle-explore-final-choice-full', `icicle-extra-candidates',
82 ;; `icicle-extra-candidates-dir-insert-p',
83 ;; `icicle-face-name-history', `icicle-fancy-candidates-p',
84 ;; `icicle-fancy-cands-internal-p',
85 ;; `icicle-file-name-completion-table',
86 ;; `icicle-file-sort-first-time-p',
87 ;; `icicle-filtered-default-value', `icicle-font-name-history',
88 ;; `icicle-frame-alist', `icicle-frame-name-history',
89 ;; `icicle-full-cand-fn', `icicle-function-name-history',
90 ;; `icicle-fundoc-last-initial-cand-set',
91 ;; `icicle-general-help-string',
92 ;; `icicle-get-alist-candidate-function',
93 ;; `icicle-hist-cands-no-highlight', `icicle-hist-var',
94 ;; `icicle-ignored-extensions', `icicle-ignored-extensions-regexp',
95 ;; `icicle-incremental-completion-p', `icicle-Info-index-cache',
96 ;; `icicle-Info-only-rest-of-book-p', `icicle-Info-tag-table-posn',
97 ;; `icicle-inhibit-sort-p', `icicle-inhibit-try-switch-buffer',
98 ;; `icicle-initial-value', `icicle-input-completion-fail-overlay',
99 ;; `icicle-input-fail-pos', `icicle-insert-string-at-pt-end',
100 ;; `icicle-insert-string-at-pt-start',
101 ;; `icicle-interactive-history', `icicle-key-prefix-description',
102 ;; `icicle-kill-history', `icicle-kmacro-alist',
103 ;; `icicle-kmacro-history',
104 ;; `icicle-last-apropos-complete-match-fn',
105 ;; `icicle-last-completion-candidate',
106 ;; `icicle-last-completion-command',
107 ;; `icicle-last-icomplete-mode-value', `icicle-last-input',
108 ;; `icicle-last-sort-comparer', `icicle-last-top-level-command',
109 ;; `icicle-last-transform-function', `icicle-lighter-truncation',
110 ;; `icicle-list-use-nth-parts', `icicle-menu-map',
111 ;; `icicle-minibuffer-message-ok-p', `icicle-minor-mode-map-entry',
112 ;; `icicle-mode-line-help', `icicle-ms-windows-drive-hash',
113 ;; `icicle-multi-completing-p', `icicle-multi-inputs-action-fn',
114 ;; `icicle-must-match-regexp', `icicle-must-not-match-regexp',
115 ;; `icicle-must-pass-after-match-predicate',
116 ;; `icicle-must-pass-predicate', `icicle-narrow-regexp',
117 ;; `icicle-nb-candidates-before-truncation',
118 ;; `icicle-nb-of-other-cycle-candidates', `icicle-new-last-cmd',
119 ;; `icicle-next-apropos-complete-cycles-p',
120 ;; `icicle-next-prefix-complete-cycles-p',
121 ;; `icicle-next-window-for-display-buffer', `icicle-orig-buff',
122 ;; `icicle-orig-font-lock-keywords',
123 ;; `icicle-orig-minibuffer-completion-pred',
124 ;; `icicle-orig-minibuffer-completion-table',
125 ;; `icicle-orig-must-match-regexp',
126 ;; `icicle-orig-must-not-match-regexp',
127 ;; `icicle-orig-must-pass-after-match-pred',
128 ;; `icicle-orig-must-pass-predicate', `icicle-orig-pt-explore',
129 ;; `icicle-orig-read-file-name-fn', `icicle-orig-window',
130 ;; `icicle-orig-win-explore', `icicle-other-window',
131 ;; `icicle-path-variables', `icicle-plist-last-initial-cand-set',
132 ;; `icicle-predicate-types-alist', `icicle-pref-arg',
133 ;; `icicle-pre-minibuffer-buffer', `icicle-post-command-hook',
134 ;; `icicle-pre-command-hook',
135 ;; `icicle-previous-raw-file-name-inputs',
136 ;; `icicle-previous-raw-non-file-name-inputs',
137 ;; `icicle-progressive-completing-p', `icicle-prompt',
138 ;; `icicle-proxy-candidate-regexp', `icicle-proxy-candidates',
139 ;; `icicle-read-char-history', `icicle-read-expression-map',
140 ;; `icicle-remove-icicles-props-p', `icicle-re-no-dot',
141 ;; `icicle-require-match-p', `icicle-reverse-multi-sort-p',
142 ;; `icicle-reverse-sort-p', `icicle-saved-candidate-overlays',
143 ;; `icicle-saved-candidates-variables-obarray',
144 ;; `icicle-saved-completion-candidate',
145 ;; `icicle-saved-completion-candidates',
146 ;; `icicle-saved-completion-candidates-internal',
147 ;; `icicle-saved-ignored-extensions',
148 ;; `icicle-saved-kmacro-ring-max', `icicle-saved-proxy-candidates',
149 ;; `icicle-saved-regexp-search-ring-max',
150 ;; `icicle-saved-region-background',
151 ;; `icicle-saved-search-ring-max', `icicle-scan-fn-or-regexp',
152 ;; `icicle-scroll-Completions-reverse-p', `icicle-search-command',
153 ;; `icicle-search-complement-domain-p',
154 ;; `icicle-search-context-level', `icicle-search-context-regexp',
155 ;; `icicle-search-current-overlay', `icicle-search-final-choice',
156 ;; `icicle-search-history', `icicle-search-in-context-fn',
157 ;; `icicle-searching-p', `icicle-search-level-overlays',
158 ;; `icicle-search-map', `icicle-search-modes',
159 ;; `icicle-search-overlays', `icicle-search-refined-overlays',
160 ;; `icicle-search-replacement',
161 ;; `icicle-search-replacement-history',
162 ;; `icicle-successive-grab-count',
163 ;; `icicle-text-property-value-history',
164 ;; `icicle-thing-at-pt-fns-pointer',
165 ;; `icicle-transform-before-sort-p', `icicle-transform-function',
166 ;; `icicle-toggle-transforming-message',
167 ;; `icicle-universal-argument-map',
168 ;; `icicle-use-candidates-only-once-alt-p',
169 ;; `icicle-vardoc-last-initial-cand-set',
170 ;; `icicle-variable-name-history',
171 ;; `icicle-whole-candidate-as-text-prop-p',
172 ;; `lacarte-menu-items-alist'.
173 ;;
174 ;; For descriptions of changes to this file, see `icicles-chg.el'.
175
176 ;;(@> "Index")
177 ;;
178 ;; If you have library `linkd.el' and Emacs 22 or later, load
179 ;; `linkd.el' and turn on `linkd-mode' now. It lets you easily
180 ;; navigate around the sections of this doc. Linkd mode will
181 ;; highlight this Index, as well as the cross-references and section
182 ;; headings throughout this file. You can get `linkd.el' here:
183 ;; http://dto.freeshell.org/notebook/Linkd.html.
184 ;;
185 ;; (@> "Internal variables (alphabetical)")
186
187 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
188 ;;
189 ;; This program is free software; you can redistribute it and/or
190 ;; modify it under the terms of the GNU General Public License as
191 ;; published by the Free Software Foundation; either version 2, or (at
192 ;; your option) any later version.
193 ;;
194 ;; This program is distributed in the hope that it will be useful, but
195 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
196 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
197 ;; General Public License for more details.
198 ;;
199 ;; You should have received a copy of the GNU General Public License
200 ;; along with this program; see the file COPYING. If not, write to
201 ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
202 ;; Floor, Boston, MA 02110-1301, USA.
203 ;;
204 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
205 ;;
206 ;;; Code:
207
208 (require 'apropos-fn+var nil t) ;; (no error if not found): apropos-command,
209 ;; apropos-function, apropos-option, apropos-variable
210
211 (require 'icicles-opt) ;; icicle-kbd, icicle-sort-comparer
212
213 ;;; Defvars to quiet byte-compiler:
214 (defvar kmacro-ring-max) ; Defined in `kmacro.el' in Emacs 22+.
215 (defvar minibuffer-confirm-exit-commands) ; Defined in `minibuffer.el' in Emacs 23+.
216 (defvar minibuffer-local-filename-completion-map)
217 (defvar minibuffer-local-filename-must-match-map)
218 (defvar minibuffer-local-must-match-filename-map)
219
220 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
221
222 ;;(@* "Internal variables (alphabetical)")
223
224 ;;; Internal variables (alphabetical) --------------------------------
225
226 (defvar lacarte-menu-items-alist nil) ; Defined in `lacarte.el'.
227
228 ;; These two are defined here so they won't raise an error in `font-lock-add-keywords'.
229 (defvar font-lock-function-name-face 'font-lock-function-name-face ; In `font-lock.el'.
230 "Face name to use for function names.")
231
232 (defvar font-lock-keyword-face 'font-lock-keyword-face ; Defined in `font-lock.el'.
233 "Face name to use for keywords.")
234
235 (defvar icicle-abs-file-candidates ()
236 "Current alist of absolute file-name candidates.
237 An alist appropriate as the COLLECTION argument for `completing-read'.
238 Each item is a cons whose car is an absolute file name (a string).")
239
240 (defvar icicle-acting-on-next/prev nil
241 "Non-nil means this command acts on the previous or next candidate.
242 The particular non-nil value indicates the navigation direction:
243 `forward' or `backward'.")
244
245 (defvar icicle-advice-info-list ()
246 "List of advice information for functions that Icicles redefines.
247 If such redefined functions are advised, then Icicles deactivates the
248 advice when you turn on Icicle mode. It restores the recorded advice
249 activation state when you turn off Icicle mode.")
250
251 (defvar icicle-all-candidates-action nil
252 "Non-nil means that we are acting on all candidates.
253 That is, `icicle-all-candidates-action-1' is in progress.
254 If neither nil nor t, then the value is the action function to use.")
255
256 (defvar icicle-all-candidates-list-action-fn nil
257 "Action function to apply to a list of all matching completions.
258 It is applied using `M-!' during completion.")
259
260 (defvar icicle-all-candidates-list-alt-action-fn nil
261 "Alternative action function to apply to a list of matching completions.
262 It is applied using `M-|' during completion.")
263
264 (defvar icicle-allowed-sort-predicate nil
265 "Predicate that `icicle-current-sort-functions' allows in a sort order.
266 That is, if this predicate is used in an entry of
267 `icicle-sort-orders-alist' then that entry is retained by
268 `icicle-current-sort-functions'.")
269
270 (defvar icicle-apply-nomsg nil
271 "Non-nil means `icicle-apply' does not show status of applying function.")
272
273 (defvar icicle-apropos-complete-match-fn 'string-match
274 "Function to filter apropos completion candidates.
275 Takes as arguments an input string and a completion candidate, and
276 returns non-nil if the string is considered to match the candidate.
277
278 A value of nil instead of a function means completion candidates are
279 not filtered by the input, except possibly by a function-valued
280 `minibuffer-completion-table'.")
281
282 (defvar icicle-apropos-value-last-initial-cand-set ()
283 "Cache for initial set of completion cands for `icicle-apropos-value'.")
284
285 (defvar icicle-auto-no-icomplete-mode-p nil
286 "Non-nil means Icomplete mode has been turned off for this minibuffer activation.
287 This automatic turning off happens when there are at least
288 `icicle-icomplete-mode-max-candidates' completion candidates.")
289
290 (defvar icicle-auto-no-sort-p nil
291 "Non-nil means sorting has been turned off for this minibuffer activation.
292 This automatic turning off happens when there are at least
293 `icicle-sorting-max-candidates' completion candidates.")
294
295 (defvar icicle-bookmark-history nil "History for bookmark names.")
296
297 (defvar icicle-bookmark-list-names-only-p nil
298 "Non-nil means `icicle-bookmark-list' returns names, not bookmarks.")
299
300 (defvar icicle-bookmark-types ()
301 "List of strings naming bookmark types.
302 The list represents the set of all bookmarks of the given types.
303 An empty list and the singleton list `(all)', where `all' is a symbol,
304 are equivalent and stand for the set of all bookmarks (of any type).")
305
306 (defvar icicle-buffer-complete-fn nil
307 "If the value is non-nil then it is a buffer-name completion function.
308 The function is used as the COLLECTION argument to `completing-read'.
309
310 However, if the value is `internal-complete-buffer' then it is used
311 only if `icicle-buffer-ignore-space-prefix-flag' is non-nil.
312
313 Otherwise, all buffer names are used as candidates.")
314
315 (defvar icicle-buffer-config-history nil "History for buffer configuration names.")
316
317 (defvar icicle-buffer-name-input-p nil
318 "Non-nil means we are reading a buffer name.")
319
320 (defvar icicle-buffer-sort-first-time-p t
321 "Non-nil means buffer-name completion has not yet been used.")
322
323 (defvar icicle-bufflist nil
324 "List of buffers defined by macro `icicle-buffer-bindings'.")
325
326 (defvar icicle-candidate-action-fn nil
327 "Action function to apply to current completion candidate.
328 It is applied by `C-RET', `C-mouse-2', and similar keys during
329 completion.
330 For `icicle-all-candidates-action' to be able to report successes,
331 this should return nil for \"success\" and non-nil for \"failure\".")
332
333 (defvar icicle-candidate-alt-action-fn nil
334 "Alternative action function to apply to current completion candidate.
335 It is applied by `C-S-RET', `C-S-mouse-2', and similar keys during
336 completion.
337 For `icicle-all-candidates-alt-action' to be able to report successes,
338 this should return nil for \"success\" and non-nil for \"failure\".")
339
340 (defvar icicle-candidate-entry-fn nil
341 "Function to apply to selected entries in `icicle-candidates-alist'.")
342
343 (defvar icicle-candidate-help-fn nil
344 "Help function to be applied to current completion candidate.
345 It is applied by `C-M-RET', `C-M-mouse-2', and similar keys during
346 completion.
347 If nil then default help function `icicle-help-on-candidate' is used.
348 If non-nil, it must be a function that accepts a completion candidate
349 in its display form. If the candidate is a multi-completion then the
350 help function can invoke `icicle-transform-multi-completion' on it,
351 binding `icicle-list-use-nth-parts' as appropriate.")
352
353 (defvar icicle-candidate-nb nil
354 "Current completion candidate number, or nil if not cycling candidates.
355 Numbering starts at zero.")
356
357 (defvar icicle-candidate-properties-alist nil
358 "Alist of multi-completion indexes and associated text properties.
359 The text properties apply to candidates in `*Completions*'.
360 Each alist entry has the form (NTH PROPERTIES) or (NTH PROPERTIES
361 JOIN-TOO).
362
363 NTH is a whole-number index identifying the multi-completion part.
364
365 PROPERTIES is a list of text properties to apply to the part.
366
367 JOIN-TOO non-nil means to also apply PROPERTIES to the join string
368 that follows the part.
369
370 Example alist:
371
372 ((3 (face 'underline))
373 (2 (invisible t) t))
374
375 The first entry underlines the third multi-completion part.
376 The second entry makes both the second part and the join string that
377 follows it invisible.")
378
379 (defvar icicle-candidates-alist nil
380 "Alist of candidate entries.
381 The car (key) of each entry is treated as a completion candidate.
382 The cdr is some other data to be used when the candidate is chosen.
383 This is reset to nil at the beginning of each top-level command.
384
385 This is used typically by commands that allow different cdrs for the
386 same car. Icicles search is one such example.")
387
388 (defvar icicle-cands-to-narrow ()
389 "Saved `icicle-completion-candidates' for reference during narrowing.")
390
391 (defvar icicle-char-property-value-history nil "History for text and overlay property values.")
392
393 (defvar icicle-cmd-calling-for-completion 'ignore
394 "Last command causing display of list of possible completions.")
395
396 (defvar icicle-cmd-reading-input 'ignore
397 "Last command reading input in the minibuffer.")
398
399 (defvar icicle-color-history nil "History for color names.")
400
401 (defvar icicle-color-theme-history nil "History for color-theme names.")
402
403 (defvar icicle-command-abbrev-history nil "History of command and abbrev entries.")
404
405 (defvar icicle-commands-for-abbrev nil
406 "List of commands that match the current abbreviation.")
407
408 (defvar icicle-common-match-string nil
409 "Expanded common match among all completion candidates.
410 nil means no such common match is available.")
411
412 (defvar icicle-comp-base-is-default-dir-p nil
413 "Non-nil means to use `default-directory' as the completion base.
414 This means use its length as `completion-base-size'.")
415
416 (defvar icicle-complete-input-overlay nil
417 "Overlay used to highlight minibuffer input when it is complete.")
418
419 (defvar icicle-complete-keys-alist () "Alist of keys and their bindings.
420 Each alist element is of the form (NAME KEY . BINDING), where:
421 NAME is a symbol naming the key and its binding, whose name has form:
422 KEYNAME = BINDING-NAME
423 KEY is the actual key sequence
424 BINDING is the actual binding of KEY.
425
426 Used only for Emacs 22 and later.")
427
428 (defvar icicle-completing-keys-p nil
429 "Non-nil means completion is currently for a key sequence.
430 Used only for Emacs 22 and later.")
431
432 (defvar icicle-completing-p nil "Cached value of function `icicle-completing-p'.")
433
434 (defvar icicle-completion-candidates nil "Current list of completion candidates.")
435
436 (defvar icicle-completion-map-vars
437 (delq nil (list 'minibuffer-local-completion-map
438 'minibuffer-local-must-match-map
439 (and (< emacs-major-version 24)
440 (boundp 'minibuffer-local-filename-completion-map)
441 (not (eq minibuffer-local-completion-map
442 (keymap-parent minibuffer-local-filename-completion-map)))
443 'minibuffer-local-filename-completion-map)
444 (and (< emacs-major-version 24)
445 (boundp 'minibuffer-local-filename-must-match-map)
446 (not (eq minibuffer-local-must-match-map
447 (keymap-parent minibuffer-local-filename-must-match-map)))
448 'minibuffer-local-filename-must-match-map)
449 (and (< emacs-major-version 24)
450 (boundp 'minibuffer-local-must-match-filename-map)
451 (not (eq minibuffer-local-must-match-map
452 (keymap-parent minibuffer-local-must-match-filename-map)))
453 'minibuffer-local-must-match-filename-map)))
454 "Minibuffer completion keymap variables.")
455
456 ;; Might as well do this here.
457 (dolist (map icicle-completion-map-vars)
458 ;; Non-nil value, to indicate completion.
459 (define-key (symbol-value map) [icicle-is-completion-map] 'ignore))
460
461 (defvar icicle-completion-prompt-overlay nil
462 "Overlay used to highlight saved completion candidates.")
463
464 (defvar icicle-completing-read+insert-candidates ()
465 "`completing-read' COLLECTION arg to use for `icicle-completing-read+insert'.")
466
467 (defvar icicle-completion-set-history nil "History for completion-set names.")
468
469 (defvar icicle-compute-narrowing-regexp-p nil
470 "Non-nil means that narrowing computes `icicle-narrow-regexp'.")
471
472 (defvar icicle-confirm-exit-commands
473 (and (boundp 'minibuffer-confirm-exit-commands)
474 (append '(icicle-prefix-complete icicle-prefix-complete-no-display
475 icicle-prefix-word-complete
476 icicle-apropos-complete icicle-apropos-complete-no-display
477 icicle-apropos-complete-and-narrow ; ????
478 ;; icicle-apropos-complete-and-exit ; ????
479 )
480 minibuffer-confirm-exit-commands))
481 "Version of `minibuffer-confirm-exit-commands' for Icicle mode.
482 Effective starting with Emacs 23.")
483
484 (defvar icicle-current-completion-candidate-overlay nil
485 "Overlay used to highlight current completion candidate.")
486
487 (defvar icicle-current-completion-mode nil
488 "Symbol `prefix' or `apropos', specifying the current completion mode.")
489
490 (defvar icicle-current-font-lock-part nil
491 "The part of `font-lock-keywords' currently being used, during cycling.
492 Updated by `icicle-next-font-lock-keywords(-repeat)'.")
493
494 (defvar icicle-current-input "" "Current minibuffer input.")
495
496 (defvar icicle-current-raw-input "" "Current minibuffer raw (unexpanded) input.
497 This can be different from `icicle-current-input' only when
498 `icicle-expand-input-to-common-match' causes your input to expand.")
499
500 (defvar icicle-cycling-p nil
501 "Non-nil means the user is currently cycling completion candidates.")
502
503 (defvar icicle-default-thing-insertion-flipped-p nil
504 "Non-nil means a previous `M-.' in this succession was used with `C-u'.
505 This means that the meaning of `icicle-default-thing-insertion' has
506 been reversed.")
507
508 (defvar icicle-dictionary-history nil "History for dictionary entries.")
509
510 (defvar icicle-dir-candidate-can-exit-p nil
511 "Non-nil means you can exit the minibuffer when you choose a directory.")
512
513 (defvar icicle-doc-history () "History for documentation entries.")
514
515 (defvar icicle-doc-last-initial-cand-set ()
516 "Cache for initial set of completion candidates for `icicle-doc'.")
517
518 (defvar icicle-dot-string-internal icicle-dot-string
519 "Internal version of `icicle-dot-string' (same values).
520 This is changed automatically by Icicles when you switch completion
521 mode, whereas `icicle-dot-string' is changed only via user commands.")
522
523 (defvar icicle-edit-update-p nil
524 "Internal flag: non-nil when editing text in minibuffer.
525 More precisely, non-nil when updating the completions list inside
526 simple character-editing commands such as `icicle-self-insert' and
527 `icicle-delete-backward-char'.")
528
529 (defvar icicle-ess-use-ido nil
530 "Non-nil means that `ess-completing-read' respects `ess-use-ido'.
531 Otherwise, in Icicle mode `ess-completing-read' always uses Icicles
532 completion, never Ido completion.")
533
534 (defvar icicle-exclude-default-proxies nil
535 "Non-nil means exclude default proxy candidates.")
536
537 (defvar icicle-explore-final-choice ""
538 "Final `icicle-explore' completion choice (a string).")
539
540 (defvar icicle-explore-final-choice-full nil
541 "Full alist element that corresponds to `icicle-explore-final-choice'.
542 This is an element of `icicle-candidates-alist'.
543 The element's car is a completion-candidate string.")
544
545 (defvar icicle-extra-candidates nil "A list of extra completion candidates (strings).")
546
547 (defvar icicle-extra-candidates-dir-insert-p t
548 "Non-nil means, for an extra candidate, insert a directory component.
549 Can be bound to nil to prevent adding a directory to non file-name
550 extra candidates during file-name completion. An extra candidate is
551 one that is a member of `icicle-extra-candidates'.")
552
553 (defvar icicle-face-name-history nil "History for face names.")
554
555 (defvar icicle-fancy-candidates-p nil
556 "Non-nil means we are completing using possibly fancy candidates.
557 That is, some candidates might have attached properties.
558
559 You can bind this in your code if you need to treat fancy candidates
560 and your code has no direct access to the `completing-read' PROMPT
561 string. See section `Candidates with Text Properties' of the Icicles
562 doc.
563
564 If you set this to non-nil, instead of binding it, then Icicles will
565 always check whether each completion candidate might be fancy. That
566 can be costly.")
567
568 (defvar icicle-fancy-cands-internal-p nil
569 "Same as `icicle-fancy-candidates-p', but for internal use only.
570 Do not set or bind this. This is bound only by `completing-read'.")
571
572 (when (> emacs-major-version 23)
573 (defvar icicle-file-name-completion-table
574 (completion-table-in-turn #'icicle-completion--embedded-envvar-table
575 #'completion-file-name-table)
576 "Completion table used for file-name completion."))
577
578 (defvar icicle-file-sort-first-time-p t
579 "Non-nil means file-name completion has not yet been used.")
580
581 (defvar icicle-filtered-default-value nil
582 "Minibuffer default value, after filtering with `icicle-filter-wo-input'.")
583
584 (defvar icicle-font-name-history nil "History for font names.")
585
586 (defvar icicle-frame-alist nil "Alist of frames, returned by `icicle-make-frame-alist'.")
587
588 (defvar icicle-frame-name-history nil "History for frame names.")
589
590 (defvar icicle-full-cand-fn nil
591 "nil or a function to create a full candidate from a display candidate.
592 If candidates are currently multi-completions then the display
593 candidate is assumed to have been transformed first (using
594 `icicle-transform-multi-completion').")
595
596 (defvar icicle-function-name-history nil "History for function names.
597 Each name is a symbol name or a lambda form, as a string.")
598
599 (defvar icicle-fundoc-last-initial-cand-set ()
600 "Cache for initial set of completion candidates for `icicle-fundoc'.")
601
602 (defvar icicle-general-help-string "
603
604
605 Customize Icicles: `M-x icicle-customize-icicles-group'.
606 Summary of customizable options and faces (alphabetical order).
607
608 Some of the options can be toggled or cycled - the keys for this are
609 noted in parentheses.
610
611 * `case-fold-search', `completion-ignore-case',
612 (`C-u') `read-file-name-completion-ignore-case'
613 - Case sensitivity? (`C-A')
614 * `completion-ignored-extensions' - Ignored filenames (`C-.')
615 * `icicle-act-before-cycle-flag' - Act then cycle or reverse?
616 * `icicle-add-proxy-candidates-flag' - Include proxies? (`C-M-_')
617 * `icicle-alternative-actions-alist' - Overriding alt actions
618 * `icicle-alternative-sort-comparer' - Other sort (`M-,', `C-M-,')
619 * `icicle-apropos-complete-keys*' - Keys to apropos-complete
620 * `icicle-apropos-cycle-*-keys' - Keys to apropos-cycle
621 * `icicle-bookmark-name-length-max' - Max length of bookmark name
622 * `icicle-bookmark-refresh-cache-flag' - Refresh bookmarks cache?
623 * `icicle-top-level-key-bindings' - Bind top-level commands
624 * `icicle-buffer-*' - `icicle-buffer' options
625 * `icicle-candidate-width-factor' - Width %%, candidate columns
626 * `icicle-change-region-background-flag' - Change region color?
627 * `icicle-change-sort-order-completion' - Control `C-,' behavior
628 * `icicle-C-l-uses-completion-flag' - `C-l' uses completion?
629 * `icicle-color-themes' - For `icicle-color-theme'
630 * `icicle-comint-dynamic-complete-replacements' - Comint complete fns
631 * `icicle-command-abbrev*' - Command abbrev behavior
632 * `icicle-complete-key-anyway-flag' - `S-TAB' must complete keys
633 * `icicle-complete-keys-self-insert-ranges'- `S-TAB' for self-insert?
634 * `icicle-completing-read+insert-keys' - Keys for complete-on-demand
635 * `icicle-completion-history-max-length' - Completion history length
636 * `icicle-completion-key-bindings' - minibuffer completion keys
637 * `icicle-completion-list-key-bindings' - `*Completions*' bindings
638 * `icicle-Completions-display-min-input-chars'- Remove `*Completions*'
639 if fewer chars input
640 * `icicle-completions-format' - `*Completions*' layout
641 * `icicle-move-Completions-frame' - `*Completions*' at edge?
642 * `icicle-Completions-text-scale-decrease'- `*Completions*' shrink
643 * `icicle-Completions-window-max-height' - Max lines, `*Completions*'
644 * `icicle-customize-save-flag' - Save some options on quit?
645 * `icicle-default-cycling-mode' - Default completion mode for
646 per-mode cycling
647 * `icicle-default-thing-insertion' - Control behavior of \
648 \\<minibuffer-local-completion-map>\\[icicle-insert-string-at-point]
649 * `icicle-default-value' - How to treat default value
650 * `icicle-define-alias-commands-flag' - Define top-level aliases?
651 * `icicle-deletion-action-flag' - `S-delete' deletes?
652 * `icicle-dot-show-regexp-flag' - Show regexp for `.'?
653 * `icicle-dot-string' - String that `.' inserts
654 * `icicle-expand-input-to-common-match' - Expand your input? (`C-M-\"')
655 * `icicle-expand-input-to-common-match-alt' - Expand your input? (`C-\"')
656 * `icicle-file-*' - `icicle-file' options
657 * `icicle-filesets-as-saved-completion-sets-flag'- Use filesets?
658 * `icicle-guess-commands-in-path' - Shell commands to complete
659 * `icicle-help-in-mode-line-delay' - Secs to show candidate help
660 * `icicle-hide-common-match-in-Completions-flag'- Show common match?
661 * `icicle-hide-non-matching-lines-flag' - Hide non-match lines?
662 * `icicle-highlight-historical-candidates-flag'
663 - Highlight past input?
664 * `icicle-highlight-input-completion-failure*'- Input non-match sign
665 * `icicle-highlight-input-initial-whitespace-flag'
666 - Highlight input whitespace?
667 * `icicle-highlight-lighter-flag' - Highlight mode-line `Icy'
668 * `icicle-incremental-completion' - Icompletion? (`C-#')
669 * `icicle-incremental-completion-delay' - Delay before update cands
670 * `icicle-incremental-completion-threshold'- # of candidates for delay
671 * `icicle-inhibit-advice-functions' - Advice-inhibited functions
672 * `icicle-inhibit-ding-flag' - Suppress audible bell
673 * `icicle-input-string' - String inserted by `C-='
674 * `icicle-inter-candidates-min-spaces' - Min spaces among candidates
675 * `icicle-isearch-complete-keys' - Keys to complete search
676 * `icicle-key-complete-keys' - Keys to complete keys
677 * `icicle-key-descriptions-use-<>-flag' - Show key names with \"<>\"?
678 * `icicle-keymaps-for-key-completion' - `S-TAB' = key-complete maps
679 * `icicle-kmacro-ring-max' - Icicles `kmacro-ring-max'
680 * `icicle-levenshtein-distance' - Levenshtein match distance
681 * `icicle-list-join-string' - Multi-completion join
682 * `icicle-list-nth-parts-join-string' - Join split-candidate parts
683 * `icicle-mark-position-in-candidate' - Mark position in cycling
684 * `icicle-menu-items-to-history-flag' - Add menus to history?
685 * `icicle-minibuffer-key-bindings' - general minibuffer keys
686 * `icicle-minibuffer-setup-hook' - Functions run after setup
687 * `icicle-modal-cycle-*-keys' - Keys for modal cycling
688 * `icicle-option-type-prefix-arg-list' - Prefix-args for `C-h C-o'
689 * `icicle-point-position-in-candidate' - Cursor position in cycling
690 * `icicle-populate-interactive-history-flag'- Track interactive use?
691 * `icicle-pp-eval-expression-print-*' - Print control for `pp-*'
692 * `icicle-prefix-complete-keys*' - Keys to prefix-complete
693 * `icicle-prefix-cycle-*-keys' - Keys to prefix-cycle
694 * `icicle-quote-shell-file-name-flag' - Quote file name in shell?
695 * `icicle-read+insert-file-name-keys' - Keys for on-demand file
696 * `icicle-regexp-quote-flag' - Escape chars? (`C-`')
697 * `icicle-regexp-search-ring-max' - `regexp-search-ring-max'
698 * `icicle-region-background' - Background for region
699 * `icicle-require-match-flag' - Override REQUIRE-MATCH?
700 * `icicle-saved-completion-sets' - Completion sets for \
701 `\\[icicle-candidate-set-retrieve]'
702 * `icicle-search-cleanup-flag' - Remove search highlighting?
703 (`C-.')
704 * `icicle-search-from-isearch-keys' - Isearch-to-Icicles keys
705 * `icicle-search-highlight-all-current-flag'- In each hit (`C-^')
706 * `icicle-search-highlight-context-levels-flag' -
707 Highlight match subgroups?
708 * `icicle-search-highlight-threshold' - # hits to highlight at once
709 * `icicle-search-hook' - Functions run by `C-c `'
710 * `icicle-search-replace-common-match-flag' - Replace ECM? (`M-;')
711 * `icicle-search-replace-literally-flag' - Replace text literally?
712 * `icicle-search-replace-whole-candidate-flag' - Replace input match
713 or whole search hit?(`M-_')
714 * `icicle-search-ring-max' - Icicles `search-ring-max'
715 * `icicle-search-whole-word-flag' - Find whole words? (`M-q')
716 * `icicle-show-Completions-help-flag' - Show `*Completions*' help?
717 * `icicle-show-Completions-initially-flag'- Show `*Completions*' 1st?
718 * `icicle-show-multi-completion-flag' - Show extra candidate info?
719 * `icicle-sort-comparer' - Sort candidates (`C-,')
720 * `icicle-sort-orders-alist' - Predicates for sorting
721 * `icicle-special-candidate-regexp' - To highlight special cands
722 * `icicle-S-TAB-completion-methods-alist'- `S-TAB' methods (`M-(')
723 * `icicle-swank-*' - Swank completion control
724 * `icicle-TAB-completion-methods' - `TAB' methods (`C-(')
725 * `icicle-TAB-shows-candidates-flag' - 1st `TAB' shows candidates?
726 * `icicle-test-for-remote-files-flag' - Check remote files? (`C-^')
727 * `icicle-thing-at-point-functions' - Functions to yank things
728 * `icicle-top-level-key-bindings' - Top-level key bindings
729 * `icicle-top-level-when-sole-completion-*'- Exiting if one completion
730 * `icicle-touche-pas-aux-menus-flag' - Add to standard menus?
731 * `icicle-transform-function' - Remove duplicates (`C-$')
732 * `icicle-type-actions-alist' - Objects and their types
733 * `icicle-unpropertize-completion-result-flag'- Properties in result?
734 * `icicle-update-input-hook' - Fns run when input changes
735 * `icicle-use-~-for-home-dir-flag' - Use `~' for $HOME? (`M-~')
736 * `icicle-use-C-for-actions-flag' - `C-' for actions? (`M-g')
737 * `icicle-use-candidates-only-once-flag' - Remove used candidate?
738 * `icicle-word-completion-keys' - Keys for word completion
739 * `icicle-WYSIWYG-Completions-flag' - WYSIWYG `*Completions*'?
740 * `icicle-yank-function' - Yank function to use
741
742 Faces that highlight input in minibuffer.
743
744 * `icicle-complete-input' - Input when it is complete
745 * `icicle-completion' - Completing?
746 * `icicle-input-completion-fail*' - Non-match part of input
747 * `icicle-match-highlight-minibuffer' - Matched part of input
748 * `icicle-multi-command-completion' - Multi-command completion?
749 * `icicle-mustmatch-completion' - Strict completion?
750 * `icicle-whitespace-highlight' - Initial whitespace in input
751
752 Faces that highlight candidates in buffer `*Completions*'.
753
754 * `icicle-candidate-part' - Part of candidate
755 * `icicle-common-match-highlight-Completions' - Max common substring
756 * `icicle-current-candidate-highlight' - Current candidate (cycling)
757 * `icicle-extra-candidate' - Extra candidate
758 * `icicle-historical-candidate' - Highlight candidates used
759 * `icicle-match-highlight-Completions' - Matched part of input
760 * `icicle-proxy-candidate' - Proxy candidate
761 * `icicle-saved-candidate' - Saved candidate
762 * `icicle-special-candidate' - Special candidate
763
764 Faces that highlight information in the mode line.
765
766 * `icicle-completion' - Completing?
767 * `icicle-mode-line-help' - Candidate help
768 * `icicle-multi-command-completion' - Multi-command completion?
769 * `icicle-mustmatch-completion' - Strict completion?
770
771 Faces that highlight for command `icicle-search'.
772
773 * `icicle-search-context-level-*' - Regexp subgroup highlighting
774 * `icicle-search-current-input' - What input matches
775 * `icicle-search-main-regexp-current' - Current match of 1st regexp
776 * `icicle-search-main-regexp-others' - Other matches of 1st regexp
777
778 Icicle mode defines many top-level commands. For a list, see the
779 Commentary headers of files `icicles-cmd1.el' and `icicles-cmd2.el'.
780
781
782 These are all of the top-level bindings in Icicle mode:
783
784 \\{icicle-mode-map}"
785 "General help string included in `icicle-minibuffer-help'.")
786
787 (defvar icicle-get-alist-candidate-function 'icicle-get-alist-candidate
788 "Function used to retrieve a full completion candidate.
789 The signature must match that of the default value,
790 `icicle-get-alist-candidate'.")
791
792 (defvar icicle-hist-cands-no-highlight ()
793 "List of candidates not highlighted using `icicle-historical-candidate'.
794 Bind, don't assign this, since the same string can have different
795 meanings in different contexts.")
796
797 (defvar icicle-hist-var nil
798 "A history variable.
799 `let'-bind this to a history variable.
800 Leave the global value as `nil', to use it conditionally: (or ...).")
801
802 (defvar icicle-ignored-extensions completion-ignored-extensions
803 "Copy of `completion-ignored-extensions', serving as a control flag.
804 When `completion-ignored-extensions' changes, we remake
805 `icicle-ignored-extensions-regexp'.")
806
807 (defvar icicle-ignored-extensions-regexp
808 (concat "\\(" (mapconcat #'regexp-quote completion-ignored-extensions "$\\|")
809 "$\\)\\'")
810 "Regular expression matching ignored file extensions.
811 If this is nil, then no file extensions are ignored.
812 The ignored file extensions come from `completion-ignored-extensions'.")
813
814 (defvar icicle-incremental-completion-p nil
815 "Takes the place of `icicle-incremental-completion' during input.
816 The program updates this to `always' from `t' after `*Completions*' has
817 been displayed.")
818
819 (defvar icicle-Info-index-cache ()
820 "Cache list of index entries and their nodes and files.
821 Each cache entry has the form (TOPIC NODE INFO-FILE).")
822
823 (defvar icicle-Info-only-rest-of-book-p nil
824 "Non-nil means complete only Info nodes from the rest of the book.")
825
826 (defvar icicle-Info-tag-table-posn nil
827 "Tag table position in last Info file used by `icicle-Info-goto-node'.")
828
829 (defvar icicle-inhibit-sort-p nil
830 "Non-nil means that users cannot sort completion candidates.
831 They also cannot remove duplicates.")
832
833 (defvar icicle-inhibit-try-switch-buffer nil
834 "Non-nil means do not switch back to `icicle-orig-buff'.
835 \(The potential switching is in `icicle-try-switch-buffer'.)")
836
837 (defvar icicle-initial-value ""
838 "Initial value used in minibuffer completion.
839 Any function that reads from the minibuffer and accepts a default
840 value or initial value should, before reading, put that value in
841 `icicle-initial-value'. For example, `completing-read' does that.
842
843 In addition, `completing-read' and `read-file-name' will respect this
844 value, using it as the initial value if none is provided explicitly.
845 This means that you can bind `icicle-initial-value' around an
846 expression that calls `completing-read' or `read-file-name', and the
847 bound value will be used as the initial value.")
848
849 (defvar icicle-input-completion-fail-overlay nil
850 "Overlay used to highlight the input portion that does not complete.")
851
852 (defvar icicle-input-fail-pos nil
853 "Position in minibuffer of start of completion match failure.
854 Nil means no match failure is known.")
855
856 (defvar icicle-insert-string-at-pt-end nil
857 "Position of end of text `icicle-insert-string-at-point' inserted.")
858
859 (defvar icicle-insert-string-at-pt-start nil
860 "Position of start of text `icicle-insert-string-at-point' inserted.")
861
862 (defvar icicle-interactive-history ()
863 "History of commands called using `call-interactively'.")
864
865 (defvar icicle-key-prefix-description ""
866 "Description of a prefix key at some point during key completion.")
867
868 (defvar icicle-kill-history nil "History of kill-ring entries.")
869
870 (when (boundp 'kmacro-ring) ; Emacs 22+
871 (defvar icicle-kmacro-alist nil
872 "Alist with elements (CANDIDATE-NAME . RING-ITEM).
873 CANDIDATE-NAME is 1, 2, 3....
874
875 RING-ITEM is an item in `kmacro-ring' or `(kmacro-ring-head)'.")
876 (defvar icicle-kmacro-history nil "History for keyboard-macro names."))
877
878 (defvar icicle-last-apropos-complete-match-fn 'string-match
879 "Last value of `icicle-apropos-complete-match-fn'.")
880
881 (defvar icicle-last-completion-candidate ""
882 "Last completion candidate used in minibuffer completion.")
883
884 (defvar icicle-last-completion-command nil "Last completion command used.")
885
886 (defvar icicle-last-icomplete-mode-value (and (featurep 'icomplete) icomplete-mode)
887 "Value of `icomplete-mode' when completion started.")
888
889 (defvar icicle-last-input "" "Last minibuffer input typed (not from cycling).")
890
891 (defvar icicle-last-sort-comparer (or icicle-sort-comparer 'icicle-case-string-less-p)
892 "Local copy of `icicle-sort-comparer', so we can restore it.")
893
894 (defvar icicle-last-top-level-command nil "Last top-level command used.")
895
896 (defvar icicle-lighter-truncation "..."
897 "String appended to Icy lighter to show candidates-list truncation.")
898
899 (defvar icicle-list-use-nth-parts nil
900 "List of indexes of multi-completion pieces to use.
901 This is not an internal variable. You can bind this in your own Lisp
902 code to affect completion behavior.
903
904 An empty list means use the entire multi-completion. Otherwise,
905 concatenate, in order, the Nth parts of the multi-completion, where N
906 is each of the (one-based) indexes, in turn. Any index larger than
907 the actual number of parts in the multi-completion means use the last
908 part.
909
910 For example: If the value is (1), then use only the first part of the
911 multi-completion as the completion candidate. If the value is (2 1),
912 then use as candidate the second part followed by the first part, the
913 two parts being joined by option `icicle-list-nth-parts-join-string'.
914 If the value is (1 99) and the multi-completion has fewer than 99
915 parts, then use the first and last parts, joined by
916 `icicle-list-nth-parts-join-string'. If the value is (2 1 2), then
917 use the second part, first part, and second part again - you can use a
918 given part any number of times.")
919
920 (defvar icicle-menu-map nil "Icicles menu-bar menu keymap.")
921
922 (defvar icicle-minibuffer-message-ok-p t
923 "Non-nil means we can show messages in minibuffer.
924 This affects only `icicle-msg-maybe-in-minibuffer'.")
925
926 (defvar icicle-minor-mode-map-entry nil "Icicles mode entry in `minor-mode-map-alist'.")
927
928 (defvar icicle-mode-line-help nil "Current mode line help (a string), or nil if none.")
929
930 (defvar icicle-ms-windows-drive-hash (and (fboundp 'make-hash-table)
931 (make-hash-table :test 'equal))
932 "Hash table for caching result of MS Windows `NET USE' system calls.
933 For Emacs 20 and 21, this is not used unless you load library `cl.el'
934 at runtime.")
935
936 (defvar icicle-multi-completing-p nil
937 "Non-nil means we are currently completing with multi-completions.")
938
939 (defvar icicle-multi-inputs-action-fn nil
940 "Function to apply to candidates that result from splitting input.
941 The current minibuffer input is interpreted as a list of candidates.
942 This function is applied to each candidate in turn, in list order.
943 If nil then act using function `icicle-candidate-action-fn'.")
944
945 (defvar icicle-must-match-regexp nil
946 "A regexp that completion candidates must match, or nil.
947 If nil, then this does nothing. If a regexp (string), then show only
948 candidates whose display form matches it (and matches the user input).
949 The display form is the string shown in `*Completions*'.
950
951 Note: This is similar to the standard variable
952 `completion-regexp-list', except:
953 * `completion-regexp-list' is a list of regexps, not just one.
954 * `icicle-must-match-regexp' is used after filtering using option
955 `icicle-transform-function'.
956
957 See also `icicle-must-not-match-regexp'.")
958
959 (defvar icicle-must-not-match-regexp nil
960 "A regexp that completion candidates must not match, or nil.
961 If nil, then this does nothing. If a regexp (string), then show only
962 candidates whose display form does not match it.
963 The display form is the string shown in `*Completions*'.
964 See also `icicle-must-match-regexp'.")
965
966 (defvar icicle-must-pass-after-match-predicate nil
967 "Predicate that completions must satisfy after matching input, or nil.
968 This is just like `icicle-must-pass-predicate', except that it is
969 applied only to display candidates that match your current input.")
970
971 (defvar icicle-must-pass-predicate nil
972 "Predicate that completion display candidates must satisfy, or nil.
973 If nil, then this does nothing. Otherwise, this is a function of one
974 argument, a display candidate (a string), and only the display
975 candidates that satisfy the predicate are displayed. A display
976 candidate is a string of text such as you see in buffer
977 `*Completions*'.
978
979 Note that this predicate is different from the PREDICATE argument for
980 function `completing-read' or `read-file-name'. The latter applies to
981 the elements of the COLLECTION argument, which are typically alist
982 entries or obarray symbols. `icicle-must-pass-predicate' applies
983 instead to a string, the display form of a completion candidate.
984
985 See also `icicle-must-pass-after-match-predicate'.")
986
987 (defvar icicle-narrow-regexp nil
988 "Regexp matching each member of `icicle-completion-candidates'.
989 This is nil except during narrowing, and then only if
990 `icicle-compute-narrowing-regexp-p' is non-nil.")
991
992 (defvar icicle-nb-candidates-before-truncation 0
993 "Number of candidates, before truncation per `icicle-max-candidates'.")
994
995 (defvar icicle-nb-of-other-cycle-candidates 0
996 "Number of other candidates available for cycling.
997 This is for use by other libraries, in particular, `icomplete+.el'.")
998
999 (defvar icicle-new-last-cmd nil
1000 "Copy of current command being executed.
1001 Used by, e.g., `icicle-execute-extended-command'.")
1002
1003 (defvar icicle-next-apropos-complete-cycles-p nil
1004 "Whether the next apropos-completion command should cycle.")
1005
1006 (defvar icicle-next-prefix-complete-cycles-p nil
1007 "Whether the next prefix-completion command should cycle.")
1008
1009 (defvar icicle-next-window-for-display-buffer nil
1010 "The window to use for the next buffer-displaying call.
1011 Affects `display-buffer', `switch-to-buffer',
1012 `switch-to-buffer-other-window', and functions that call these.
1013 \(Not used for Emacs versions prior to Emacs 24.)")
1014
1015 (defvar icicle-orig-buff nil
1016 "Current buffer when you invoked an Icicles multi-command.")
1017
1018 (defvar icicle-orig-font-lock-keywords nil
1019 "Saved value of `font-lock-keywords'.")
1020 (make-variable-buffer-local 'icicle-orig-font-lock-keywords)
1021
1022 (defvar icicle-orig-minibuffer-completion-pred nil
1023 "Saved value of `minibufer-completion-predicate'.")
1024
1025 (defvar icicle-orig-minibuffer-completion-table nil
1026 "Saved value of `minibufer-completion-table'.")
1027
1028 (defvar icicle-orig-must-match-regexp nil
1029 "Saved value of `icicle-must-match-regexp'.")
1030
1031 (defvar icicle-orig-must-not-match-regexp nil
1032 "Saved value of `icicle-must-not-match-regexp'.")
1033
1034 (defvar icicle-orig-must-pass-after-match-pred nil
1035 "Saved value of `icicle-must-pass-after-match-predicate'.")
1036
1037 (defvar icicle-orig-must-pass-predicate nil
1038 "Saved value of `icicle-must-pass-predicate'.")
1039
1040 (defvar icicle-orig-pt-explore nil
1041 "Point when you invoked `icicle-explore'.")
1042
1043 (defvar icicle-orig-read-file-name-fn (and (not (boundp 'read-file-name-function)) ; Em 22+
1044 'icicle-ORIG-read-file-name) ; Emacs 20, 21
1045 "Value of `read-file-name-function' outside of Icicle mode.
1046 For versions of Emacs < 22, this is the original `read-file-name'.")
1047
1048 (defvar icicle-orig-window nil
1049 "Selected window when you invoked an Icicles multi-command.")
1050
1051 (defvar icicle-orig-win-explore nil
1052 "Selected window when you invoked `icicle-explore'.")
1053
1054 (defvar icicle-other-window nil
1055 "Window scrolled by `icicle-scroll-forward'/`icicle-scroll-backward'")
1056
1057 (defvar icicle-path-variables '(cd-path charset-map-path compilation-search-path
1058 custom-theme-load-path exec-path ffap-bib-path ffap-c-path
1059 ffap-fortran-path ffap-tex-path find-function-source-path
1060 image-load-path load-path x-bitmap-file-path)
1061 "List of variables whose value can be a list containing directories.
1062 The variables are not checked until they are used. At that time:
1063 * Any of them that are not bound are ignored.
1064 * If the value of any of them is not a list it is ignored.
1065 * If it is a list, any non-string elements in the list are ignored.")
1066
1067 (defvar icicle-plist-last-initial-cand-set ()
1068 "Cache for initial set of completion candidates for `icicle-plist'.")
1069
1070 (defvar icicle-post-command-hook nil
1071 "Functions added to `post-command-hook' when in Icicle mode.
1072 Use command `icy-mode' (aka `icicle-mode') to set this up properly.")
1073
1074 (defvar icicle-pre-command-hook nil
1075 "Functions added to `pre-command-hook' when in Icicle mode.
1076 Use command `icy-mode' (aka `icicle-mode') to set this up properly.")
1077
1078 (defvar icicle-predicate-types-alist
1079 '(("arrayp") ("atom") ("auto-save-file-name-p" . "file") ("backup-file-name-p" . "file")
1080 ("booleanp") ("bool-vector-p") ("bufferp" . "buffer")
1081 ("byte-code-function-p" . "function") ("byte-compile-const-symbol-p" . "symbol")
1082 ("case-table-p") ("char-or-string-p") ("char-table-p") ("color-defined-p" . "color")
1083 ("commandp" . "command") ("consp") ("custom-variable-p" . "option")
1084 ("display-table-p") ("facep" . "face") ("fboundp" . "function")
1085 ("ffap-file-remote-p" . "file") ("file-accessible-directory-p" . "file")
1086 ("file-directory-p" . "file") ("file-executable-p" . "file")
1087 ("file-exists-p" . "file") ("file-name-absolute-p" . "file")
1088 ("file-readable-p" . "file") ("file-regular-p" . "file") ("file-remote-p" . "file")
1089 ("file-symlink-p" . "file") ("file-writable-p" . "file") ("floatp")
1090 ("frame-configuration-p") ("frame-iconified-p" . "frame") ("frame-live-p" . "frame")
1091 ("frame-visible-p" . "frame") ("framep" . "frame") ("functionp" . "function")
1092 ("hash-table-p") ("icicle-binary-option-p" . "option") ("info-file-exists-p" . "file")
1093 ("integer-or-marker-p") ("integerp") ("keymapp") ("keywordp") ("listp")
1094 ("local-variable-p" . "variable") ("markerp") ("wholenump") ("nlistp") ("numberp")
1095 ("number-or-marker-p") ("overlayp") ("processp" . "process")
1096 ("process-running-child-p" . "process") ("risky-local-variable-p" . "variable")
1097 ("safe-local-variable-p" . "variable") ("sequencep") ("string-or-null-p") ("stringp")
1098 ("subrp") ("symbolp" . "symbol") ("syntax-table-p")
1099 ("thumfr-thumbnail-frame-p" . "frame") ("truncated-partial-width-window-p" . "window")
1100 ("user-variable-p" . "option") ("vectorp") ("window-configuration-p")
1101 ("window-fixed-size-p" . "window") ("window-full-width-p" . "window")
1102 ("window-live-p" . "window") ("window-minibuffer-p" . "window") ("windowp" . "window")
1103 ("window-safely-shrinkable-p" . "window") ("x-color-defined-p" . "color"))
1104 "Alist of type names that are predicate names.
1105 Each element is cons of a predicate name and the associated type from
1106 `icicle-type-actions-alist' (or nil if there is no associated type).")
1107
1108 (defvar icicle-pref-arg nil
1109 "Prefix arg value when you invoked an Icicles multi-command.")
1110
1111 (defvar icicle-pre-minibuffer-buffer nil
1112 "Buffer that was current before the minibuffer became active.")
1113
1114 (defvar icicle-previous-raw-file-name-inputs nil
1115 "Previous inputs user has typed during file-name completion.
1116 These are inputs typed but not necessarily entered with `RET'.")
1117
1118 (defvar icicle-previous-raw-non-file-name-inputs nil
1119 "Previous inputs user has typed during non-file-name completion.
1120 These are inputs typed but not necessarily entered with `RET'.")
1121
1122 (defvar icicle-progressive-completing-p nil
1123 "Non-nil means this completion is a narrowing completion.")
1124
1125 (defvar icicle-prompt nil
1126 "A minibuffer prompt.
1127 `let'-bind this to a string.
1128 Leave the global value as `nil', to use it conditionally: (or ...).")
1129
1130 (defvar icicle-proxy-candidate-regexp nil
1131 "Regexp to match proxy candidates, or nil to do nothing.
1132 The candidates are highlighted in buffer `*Completions*' using face
1133 `icicle-proxy-candidate'.")
1134
1135 (defvar icicle-proxy-candidates nil "List of proxy completion candidates (strings).")
1136
1137 (when (fboundp 'read-char-by-name) ; Emacs 23+
1138 (defvar icicle-read-char-history ()
1139 "History list for reading characters by name.
1140 Augmented by `icicle-read-char-maybe-completing' and
1141 `icicle-read-char-by-name'."))
1142
1143 (defvar icicle-read-expression-map nil
1144 "Icicle mode version of `read-expression-map'.
1145 Several standard Emacs-Lisp mode key bindings are available.
1146 In addition, `TAB' completes a symbol and `C-M-i' (or `ESC TAB')
1147 indents the current line.")
1148 (unless icicle-read-expression-map
1149 (let ((map (make-sparse-keymap)))
1150 (define-key map (icicle-kbd "C-M-i") 'lisp-indent-line) ; `ESC TAB', `C-M-i'
1151 (define-key map (icicle-kbd "C-i") 'lisp-complete-symbol) ; `C-i', `TAB'
1152 (define-key map (icicle-kbd "ESC tab") 'lisp-indent-line) ; `ESC tab'
1153 (define-key map (icicle-kbd "C-M-x") 'eval-defun) ; `ESC C-x', `C-M-x'
1154 (define-key map (icicle-kbd "C-M-q") (if (fboundp 'indent-pp-sexp) ; `ESC C-q', `C-M-q'
1155 'indent-pp-sexp ; Emacs 22+
1156 'indent-sexp))
1157 ;;(define-key map (icicle-kbd "DEL") 'backward-delete-char-untabify)
1158 (set-keymap-parent map minibuffer-local-map)
1159 (setq icicle-read-expression-map map)))
1160
1161 (defvar icicle-remove-icicles-props-p t
1162 "Non-nil means to remove Icicles text properties from completion result.
1163 Icicles binds this internal variable to nil in contexts where it needs
1164 the completion result string to retain its Icicles text properties.
1165
1166 Otherwise, function `icicle-unpropertize-completion' removes at least
1167 the Icicles internal text properties from the final completion result.
1168 Depending on the value of option
1169 `icicle-unpropertize-completion-result-flag', it may also remove all
1170 text properties.")
1171
1172 ;; Same as `directory-files-no-dot-files-regexp' in `files.el', available for Emacs 23+.
1173 (defconst icicle-re-no-dot "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"
1174 "Regexp that matches anything except `.' and `..'.")
1175
1176 (defvar icicle-require-match-p nil
1177 "Current REQUIRE-MATCH arg to `completing-read' or `read-file-name'.
1178 Starting with Emacs 23, this is no longer enough to tell whether a
1179 match is required - use function `icicle-require-match-p' instead.")
1180
1181 (defvar icicle-reverse-multi-sort-p nil
1182 "Non-nil means the truth values returned by predicates are complemented.
1183 This changes the order of the sorting groups, but it does not in
1184 general reverse that order. The order within each group is unchanged
1185 \(not reversed).")
1186
1187 (defvar icicle-reverse-sort-p nil
1188 "Non-nil means that candidates are being sorted in the reverse order.")
1189
1190 (defvar icicle-saved-candidate-overlays nil
1191 "Overlays used to highlight saved completion candidates.")
1192
1193 (defvar icicle-saved-candidates-variables-obarray (make-vector 100 0)
1194 "Obarray of variables you have saved sets of completion candidates in.
1195 Used for completion in `icicle-candidate-set-retrieve-from-variable'.")
1196
1197 (defvar icicle-saved-completion-candidate nil
1198 "Completion candidate to be restored after recursive `completing-read'.")
1199
1200 (defvar icicle-saved-completion-candidates nil
1201 "Completion candidates saved using `icicle-candidate-set-save'.")
1202
1203 (defvar icicle-saved-completion-candidates-internal nil
1204 "Completion candidates saved temporarily by program.")
1205
1206 (defvar icicle-saved-ignored-extensions nil
1207 "Local copy of `icicle-ignored-extensions', so we can restore it.")
1208
1209 (when (boundp 'kmacro-ring) ; Emacs 22+
1210 (defvar icicle-saved-kmacro-ring-max kmacro-ring-max
1211 "Saved value of `kmacro-ring-max', so it can be restored."))
1212
1213 (defvar icicle-saved-regexp-search-ring-max regexp-search-ring-max
1214 "Saved value of `search-ring-max', so it can be restored.")
1215
1216 (defvar icicle-saved-proxy-candidates nil "Saved value of `icicle-proxy-candidates'.")
1217
1218 (defvar icicle-saved-region-background nil
1219 "Background of `region' face. Saved so it can be restored.")
1220
1221 (defvar icicle-saved-search-ring-max search-ring-max
1222 "Saved value of `search-ring-max', so it can be restored.")
1223
1224 (defvar icicle-scan-fn-or-regexp nil
1225 "`icicle-search' parameter SCAN-FN-OR-REGEXP. Used by `M-,'.")
1226
1227 (defvar icicle-scroll-Completions-reverse-p nil
1228 "Non-nil means `icicle-scroll-Completions-*' scrolls in opposite direction.")
1229
1230 (defvar icicle-search-command 'icicle-search
1231 "Command to use for Icicles searches.
1232 You can set a buffer-local value of this variable, to use a specific
1233 search command in a particular mode.")
1234
1235 (defvar icicle-search-complement-domain-p nil
1236 "Non-nil means complement the initial search candidates wrt the buffer.
1237 This has an effect only on (some) Icicles search commands.
1238 The scan function or regexp for the search command defines a set of
1239 matches in the buffer. If this option is non-nil then the actual
1240 candidates used are the sections of buffer text that are separated by
1241 the initial candidates, that is, the non-candidates as defined by the
1242 scan or regexp.")
1243
1244 (defvar icicle-search-context-level 0
1245 "Match level for `icicle-search' context regexp.
1246 0 means use whatever matches the whole context regexp as the search
1247 context. 1 means use whatever matches the first subgroup of the
1248 regexp as the search context, and so on.")
1249
1250 (defvar icicle-search-context-regexp ""
1251 "Current search-context regexp used in `icicle-search'.")
1252
1253 (defvar icicle-search-current-overlay nil
1254 "Overlay used to highlight current match of `icicle-search' regexp arg.")
1255
1256 (defvar icicle-search-final-choice nil
1257 "Final user input from `icicle-search'.
1258 This might or might not be one of the possible search candidates.")
1259
1260 (defvar icicle-search-history nil "History for `icicle-search' final choices.")
1261
1262 (defvar icicle-search-in-context-fn 'icicle-search-in-context-default-fn
1263 "Function used by `icicle-search-action' to act on search context.
1264 The default value is `icicle-search-in-context-default-fn'.
1265 The function must take two arguments:
1266 - A full search candidate object, which is a cons of the candidate
1267 name and its source-file marker.
1268 - A replacement string, or nil, if no replacement is to be made.
1269
1270 When the function is called, the region has been narrowed to the
1271 current search context.")
1272
1273 (defvar icicle-searching-p nil "Non-nil means an Icicles search command is in progress.")
1274
1275 (defvar icicle-search-level-overlays nil
1276 "Overlays used to highlight context levels other than the top level.")
1277
1278 (defvar icicle-search-map
1279 (let ((map (make-sparse-keymap)))
1280 (define-key map (icicle-kbd "b") 'icicle-search-buffer) ; `b'uffer
1281 (define-key map (icicle-kbd "c") 'icicle-search-char-property) ; `c'har property
1282 (define-key map (icicle-kbd "d") 'icicle-search-defs) ; `d'efinitions
1283 (define-key map (icicle-kbd "D") 'icicle-search-defs-full) ; `D'efinitions
1284 (define-key map (icicle-kbd ",") 'icicle-tags-search) ; Like `M-,' for `tags-loop-continue'
1285 (define-key map (icicle-kbd "f") 'icicle-search-file) ; `f'ile
1286 (define-key map (icicle-kbd "g") 'icicle-grep-saved-file-candidates) ; `g'rep
1287 (define-key map (icicle-kbd "i") 'icicle-imenu) ; `i'menu
1288 (define-key map (icicle-kbd "I") 'icicle-imenu-full) ; `I'menu
1289 (define-key map (icicle-kbd "j") 'icicle-search-bookmark) ; `j'ump to bookmark first
1290 (define-key map (icicle-kbd "J") 'icicle-search-bookmarks-together); `J'ump to bookmark 1st
1291 (define-key map (icicle-kbd "k") 'icicle-search-keywords) ; `k'eywords
1292 (define-key map (icicle-kbd "l") 'icicle-search-lines) ; `l'ines
1293 (define-key map (icicle-kbd "C-l") 'icicle-search-pages) ; `C-l' is the page separator
1294 ;; Save `m' for `marked'/`mode-specific'.
1295 (define-key map (icicle-kbd "o") 'icicle-occur) ; `o'ccur
1296 (define-key map (icicle-kbd "p") 'icicle-search-paragraphs) ; `p'aragraphs
1297 (define-key map (icicle-kbd "O") 'icicle-search-overlay-property) ; `O'verlay
1298 (define-key map (icicle-kbd "s") 'icicle-search-sentences) ; `s'entence
1299 (define-key map (icicle-kbd "M-s") 'icicle-search-generic)
1300 (define-key map (icicle-kbd "t") 'icicle-search-thing) ; `t'hing
1301 (define-key map (icicle-kbd "T") 'icicle-search-text-property) ; `T'ext
1302 (define-key map (icicle-kbd "w") 'icicle-search-word) ; `w'ord
1303 (define-key map (icicle-kbd "x") 'icicle-search-xml-element) ; `x'ml
1304 (define-key map (icicle-kbd "X") 'icicle-search-xml-element-text-node) ; `X'ml
1305 map)
1306 "Keymap for Icicles search commands.
1307 It is bound to the key prefix `icicle-search-key-prefix'.")
1308
1309 (defvar icicle-search-modes
1310 '((dired-mode (progn (unless (fboundp 'diredp-get-files)
1311 (icicle-user-error "You need library `Dired+' for this"))
1312 (diredp-get-files)))
1313 (ibuffer-mode (nreverse (ibuffer-get-marked-buffers)))
1314 (Buffer-menu-mode (Buffer-menu-marked-buffers))
1315 (bookmark-bmenu-mode (progn (unless (fboundp 'bmkp-bmenu-get-marked-files)
1316 (icicle-user-error "You need library `Bookmark+' for this"))
1317 (bmkp-bmenu-get-marked-files))))
1318 "Alist that maps `major-mode' values to sexps that return WHERE.
1319 Each entry is a two-element list (MODE SEXP).
1320 SEXP returns the WHERE argument for `icicle-search', for MODE.")
1321
1322 (defvar icicle-search-overlays nil
1323 "Overlays used to highlight match of `icicle-search' regexp argument.")
1324
1325 (defvar icicle-search-refined-overlays nil
1326 "Overlay(s) used to highlight match of current input for `icicle-search'.
1327 If `icicle-search-highlight-threshold' is less than one, then this is
1328 a single overlay (or nil). Otherwise, this is a list of overlays.")
1329
1330 (defvar icicle-search-replacement nil
1331 "Replacement string for use during `icicle-search'.")
1332
1333 (defvar icicle-search-replacement-history nil
1334 "History variable for reading replacement string for `icicle-search'.")
1335
1336 (defvar icicle-successive-grab-count 0
1337 "Number of text things to be grabbed by next `\\<minibuffer-local-map>\
1338 \\[icicle-insert-string-at-point]'.")
1339
1340 (defvar icicle-text-property-value-history nil
1341 "History variable for reading text properties.")
1342
1343 ;; (defvar icicle-text-properties-alist
1344 ;; '(;; Properties listed in Elisp manual node `Special Properties':
1345 ;; ("category") ("face") ("font-lock-face") ("mouse-face") ("fontified") ("display")
1346 ;; ("help-echo") ("keymap") ("local-map") ("syntax-table") ("read-only") ("invisible")
1347 ;; ("intangible") ("field") ("cursor") ("pointer") ("line-spacing") ("line-height")
1348 ;; ("modification-hooks") ("insert-in-front-hooks") ("insert-behind-hooks")
1349 ;; ("point-entered") ("point-left")
1350 ;; ;; Properties listed in Elisp manual node `Format Properties':
1351 ;; ("hard") ("right-margin") ("left-margin") ("justification")
1352 ;; ;; Properties listed in Elisp manual node `Links and Mouse-1':
1353 ;; ("follow-link")
1354 ;; ;; Others in Emacs-Lisp libraries in directory `lisp':
1355 ;; ("allout-was-hidden") ("ansi-color") ("buffer") ("buffer-name") ("column")
1356 ;; ("button") ("skip") ("literal") ("front-sticky") ("rear-nonsticky") ("composition")
1357 ;; ("untranslated-utf-8") ("yank-handler") ("dired-filename") ("read-face-name")
1358 ;; ("directory") ("message") ("debug") ("font-lock-multiline") ("unknown")
1359 ;; ("insert-in-front-hooks") ("kbd-help") ("hilit-chg") ("ibuffer-filter-group-name")
1360 ;; ("ibuffer-properties") ("ibuffer-title") ("ibuffer-summary")
1361 ;; ("ibuffer-title-header") ("inhibit-line-move-field-capture") ("image-counter")
1362 ;; ("header-line") ("cvs-goal-column") ("occur-target") ("occur-match")
1363 ;; ("foreign-selection") ("before-string") ("after-string") ("ses")
1364 ;; ("smerge-force-highlighting") ("speedbar-function") ("speedbar-token")
1365 ;; ("speedbar-text") ("type") ("stroke-glyph") ("data") ("thumb-image-file")
1366 ;; ("original-file-name") ("associated-dired-buffer") ("tags") ("comment")
1367 ;; ("tumme-thumbnail") ("tutorial-remark") ("vc-cvs-annotate-time") ("end-name")
1368 ;; ("old-name") ("end-link") ("old-link") ("end-perm") ("old-perm") ("perm-changed")
1369 ;; ("widget-doc") ("secret") ("real-field")
1370 ;; ;; Others in Emacs-Lisp libraries in directory `lisp/emacs-lisp':
1371 ;; ("elp-symname") ("printed-value") ("duplicable")
1372 ;; ;; Others in Emacs-Lisp libraries in directory `lisp/emulation':
1373 ;; ("cursor")
1374 ;; ;; Others in Emacs-Lisp libraries in directory `lisp/erc':
1375 ;; ("erc-callback") ("erc-data") ("erc-identified") ("erc-parsed") ("erc-parsed")
1376 ;; ("timestamp") ("erc-prompt")
1377 ;; ;; Others in Emacs-Lisp libraries in directory `lisp/eshell':
1378 ;; ("comment") ("arg-begin") ("arg-end") ("escaped") ("history") ("number")
1379 ;; ("test-func")
1380 ;; ;; Others in Emacs-Lisp libraries in directory `lisp/gnus':
1381 ;; ("earcon-data") ("earcon-callback") ("gnus-category") ("gnus-part")
1382 ;; ("article-type") ("gnus-decoration") ("dummy-invisible") ("original-date")
1383 ;; ("gnus-data") ("gnus-callback") ("gnus-prev") ("gnus-next") ("gnus-mime-details")
1384 ;; ("gnus-line-format") ("gnus-backlog") ("gnus-image-category")
1385 ;; ("gnus-image-text-deletable") ("gnus-group") ("gnus-level") ("gnus-indentation")
1386 ;; ("gnus-unread") ("gnus-number") ("articles") ("gnus-server") ("gnus-named-server")
1387 ;; ("gnus-intangible") ("gnus-topic") ("gnus-topic-level") ("gnus-topic-unread")
1388 ;; ("gnus-topic-visible") ("gnus-active") ("gnus-position") ("gnus-time")
1389 ;; ("gnus-face") ("gnus-undeletable") ("message-rank") ("egg-end") ("egg-lang")
1390 ;; ("egg-start") ("message-hidden") ("message-deletable") ("buffer") ("from") ("mm")
1391 ;; ("script-name")
1392 ;; ;; Others in Emacs-Lisp libraries in directory `lisp/international':
1393 ;; ("kkc-conversion-index") ("advice") ("untranslated-utf-8") ("composition")
1394 ;; ;; Others in Emacs-Lisp libraries in directory `lisp/mail':
1395 ;; ("footnote-number") ("rmail-fontified")
1396 ;; ;; Others in Emacs-Lisp libraries in directory `lisp/mh-e':
1397 ;; ("mh-data") ("mh-mime-inserted") ("mh-part") ("mh-region") ("mh-callback")
1398 ;; ("mh-button-pressed") ("mh-line-format") ("mh-folder") ("mh-children-p")
1399 ;; ("mh-expanded") ("mh-level") ("mh-count")
1400 ;; ;; Others in Emacs-Lisp libraries in directory `lisp/net':
1401 ;; ("feed") ("w3m-image") ("nt-age") ("nt-title") ("nt-guid") ("nt-desc")
1402 ;; ("org-invisible") ("nt-link") ("nt-type") ("nt-face")
1403 ;; ;; Others in Emacs-Lisp libraries in directory `lisp/progmodes':
1404 ;; ("c-type") ("c-awk-NL-prop") ("c-is-sws") ("c-decl-arg-start") ("c-decl-end")
1405 ;; ("c-decl-id-start") ("c-decl-type-start") ("message") ("REx-interpolated")
1406 ;; ("in-pod") ("here-doc-group") ("syntax-type") ("indentable") ("REx-part2")
1407 ;; ("first-format-line") ("attrib-group") ("cperl-postpone") ("cpp-data")
1408 ;; ("cpp-callback") ("token") ("ebrowse-tree") ("ebrowse-member") ("ebrowse-what")
1409 ;; ("gdb-enabled") ("gdb-bptno") ("gdb-max-frames") ("link") ("fetch") ("begin-glyph")
1410 ;; ("begin-glyph-layout") ("idlwave-class") ("data") ("source") ("keyword")
1411 ;; ("find-args")
1412 ;; ;; Others in Emacs-Lisp libraries in directory `lisp/term':
1413 ;; ("mac-ts-active-input-string")
1414 ;; ;; Others in Emacs-Lisp libraries in directory `lisp/textmodes':
1415 ;; ("fill-space") ("priority") ("test") ("end-glyph") ("begin-glyph") ("org-cwidth")
1416 ;; ("org-dwidth") ("org-dwidth-n") ("org-linked-text") (":org-clock-minutes")
1417 ;; ("org-protected") ("org-date-line") ("org-today") ("day") ("org-agenda-type")
1418 ;; ("time-of-day") ("org-not-done-regexp") ("prefix-length") ("tags") ("org-marker")
1419 ;; ("org-agenda-diary-link") ("org-hd-marker") ("dotime") ("org-category")
1420 ;; ("undone-face") ("done-face") ("xr-alist") ("table-cell") ("text-clones")
1421 ;; ;; Others in my own libraries:
1422 ;; ("font-lock-ignore") ("highlight") ("back-link") ("forward-link"))
1423 ;; "Alist of text properties known to Emacs.
1424 ;; Each element is of form (PROP), where PROP is the name of a text
1425 ;; property (a string).")
1426
1427 (defvar icicle-thing-at-pt-fns-pointer 0
1428 "Current index into the car of `icicle-thing-at-point-functions'.
1429 This points to the current function in the list.")
1430
1431 (defvar icicle-toggle-transforming-message "Completion-candidate transformation is now %s"
1432 "Message used by `icicle-toggle-transforming'.
1433 A format string that includes one `%s', to be replaced by `ON'/`OFF'.")
1434
1435 (defvar icicle-transform-before-sort-p nil
1436 "Non-nil means transform each multi-completion candidate before sorting.
1437 Bind this to non-nil if you do not want sorting to use the whole
1438 multi-completion.")
1439
1440 (defvar icicle-transform-function nil ; Toggle with `C-$,'.
1441 "Function used to transform the list of completion candidates.
1442 This is applied to the list of initial candidates.
1443 If this is nil, then no transformation takes place.
1444
1445 You can toggle this at any time from the minibuffer using `C-$,'.
1446
1447 The value is changed by program locally, for use in particular
1448 contexts. E.g., when you use `C-c C-`' (`icicle-search-generic') in a
1449 `*shell*' buffer, Icicles uses this variable with a value of
1450 `icicle-remove-duplicates', to remove duplicate shell commands from
1451 your input history list.
1452
1453 You can use this variable in your Lisp code to transform the list of
1454 candidates any way you like. A typical use is to remove duplicates,
1455 by binding it to `icicle-remove-duplicates' or
1456 `icicle-remove-dups-if-extras'.")
1457
1458 (defvar icicle-last-transform-function (or icicle-transform-function
1459 'icicle-remove-duplicates)
1460 "Local copy of `icicle-transform-function', so we can restore it.")
1461
1462 (defvar icicle-universal-argument-map
1463 (let ((map (make-sparse-keymap))
1464 (universal-argument-minus
1465 (and (fboundp 'universal-argument--mode) ; Emacs 24.4+
1466 `(menu-item "" icicle-negative-argument
1467 :filter ,(lambda (cmd) (if (integerp prefix-arg) nil cmd))))))
1468 (cond ((fboundp 'universal-argument-other-key) ; Emacs < 24.4
1469 (define-key map [t] 'icicle-universal-argument-other-key)
1470 (define-key map (vector meta-prefix-char t) 'icicle-universal-argument-other-key)
1471 (define-key map [switch-frame] nil))
1472 (t ; Emacs 24.4+
1473 (define-key map [switch-frame] (lambda (evt)
1474 (interactive "e")
1475 (handle-switch-frame evt)
1476 (universal-argument--mode)))))
1477 (define-key map (icicle-kbd "C-u") 'icicle-universal-argument-more)
1478 (define-key map (icicle-kbd "-") (if (fboundp 'universal-argument--mode)
1479 universal-argument-minus ; Emacs 24.4+
1480 'icicle-universal-argument-minus))
1481 (define-key map (icicle-kbd "0") 'icicle-digit-argument)
1482 (define-key map (icicle-kbd "1") 'icicle-digit-argument)
1483 (define-key map (icicle-kbd "2") 'icicle-digit-argument)
1484 (define-key map (icicle-kbd "3") 'icicle-digit-argument)
1485 (define-key map (icicle-kbd "4") 'icicle-digit-argument)
1486 (define-key map (icicle-kbd "5") 'icicle-digit-argument)
1487 (define-key map (icicle-kbd "6") 'icicle-digit-argument)
1488 (define-key map (icicle-kbd "7") 'icicle-digit-argument)
1489 (define-key map (icicle-kbd "8") 'icicle-digit-argument)
1490 (define-key map (icicle-kbd "9") 'icicle-digit-argument)
1491 (define-key map (icicle-kbd "kp-0") 'icicle-digit-argument)
1492 (define-key map (icicle-kbd "kp-1") 'icicle-digit-argument)
1493 (define-key map (icicle-kbd "kp-2") 'icicle-digit-argument)
1494 (define-key map (icicle-kbd "kp-3") 'icicle-digit-argument)
1495 (define-key map (icicle-kbd "kp-4") 'icicle-digit-argument)
1496 (define-key map (icicle-kbd "kp-5") 'icicle-digit-argument)
1497 (define-key map (icicle-kbd "kp-6") 'icicle-digit-argument)
1498 (define-key map (icicle-kbd "kp-7") 'icicle-digit-argument)
1499 (define-key map (icicle-kbd "kp-8") 'icicle-digit-argument)
1500 (define-key map (icicle-kbd "kp-9") 'icicle-digit-argument)
1501 (define-key map (icicle-kbd "kp-subtract") (if (fboundp 'universal-argument--mode)
1502 universal-argument-minus ; Emacs 24.4+
1503 'icicle-universal-argument-minus))
1504 map)
1505 "Keymap used while processing `C-u' during Icicles completion.")
1506
1507 (defvar icicle-use-candidates-only-once-alt-p nil
1508 "*Non-nil means remove each candidate from the set after using it.
1509 This is similar to `icicle-use-candidates-only-once-flag', but it is
1510 used only for alternative actions (e.g. `C-S-RET').")
1511
1512 (defvar icicle-vardoc-last-initial-cand-set ()
1513 "Cache for initial set of completion candidates for `icicle-vardoc'.")
1514
1515 (defvar icicle-whole-candidate-as-text-prop-p nil
1516 "Non-nil means string candidate has candidate data as text property.
1517 If non-nil, then the value of text property `icicle-whole-candidate'
1518 for a string completion candidate (e.g. what is displayed) is the cdr
1519 of the full completion-candidate alist element. The car of that
1520 element is the string.")
1521
1522 (defvar icicle-variable-name-history nil "History for variable names.")
1523
1524 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1525
1526 (provide 'icicles-var)
1527
1528 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1529 ;;; icicles-var.el ends here