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