initial commit
[emacs-init.git] / auto-install / icicles-opt.el
1 ;;; icicles-opt.el --- User options (variables) for Icicles
2 ;;
3 ;; Filename: icicles-opt.el
4 ;; Description: User options (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:22:14 2006
9 ;; Version: 22.0
10 ;; Last-Updated: Mon Sep  5 14:33:18 2011 (-0700)
11 ;;           By: dradams
12 ;;     Update #: 4465
13 ;; URL: http://www.emacswiki.org/cgi-bin/wiki/icicles-opt.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 ;;   `backquote', `bytecomp', `cl', `el-swank-fuzzy', `ffap',
21 ;;   `ffap-', `fuzzy', `fuzzy-match', `hexrgb', `icicles-face',
22 ;;   `icicles-mac', `kmacro', `levenshtein', `regexp-opt',
23 ;;   `thingatpt', `thingatpt+', `wid-edit', `widget'.
24 ;;
25 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
26 ;;
27 ;;; Commentary:
28 ;;
29 ;;  This is a helper library for library `icicles.el'.  It defines
30 ;;  user options (variables).  For Icicles documentation, see
31 ;;  `icicles-doc1.el' and `icicles-doc2.el'.
32 ;;
33 ;;  Widgets defined here:
34 ;;
35 ;;    `icicle-key-definition'.
36 ;;
37 ;;  Constants defined here:
38 ;;
39 ;;    `icicle-anychar-regexp', `icicle-Completions-misc-submenu',
40 ;;    `icicle-Completions-save/retrieve-submenu',
41 ;;    `icicle-Completions-sets-submenu',
42 ;;    `icicle-Completions-sorting-submenu',
43 ;;    `icicle-Completions-this-candidate-submenu',
44 ;;    `icicle-Completions-toggle-submenu'.
45 ;;
46 ;;  User options defined here (in Custom group `Icicles'):
47 ;;
48 ;;    `icicle-act-before-cycle-flag',
49 ;;    `icicle-add-proxy-candidates-flag',
50 ;;    `icicle-alternative-actions-alist',
51 ;;    `icicle-alternative-sort-comparer',
52 ;;    `icicle-apropos-complete-keys',
53 ;;    `icicle-apropos-complete-no-display-keys',
54 ;;    `icicle-apropos-cycle-next-keys',
55 ;;    `icicle-apropos-cycle-next-action-keys',
56 ;;    `icicle-apropos-cycle-next-alt-action-keys',
57 ;;    `icicle-apropos-cycle-next-help-keys',
58 ;;    `icicle-apropos-cycle-previous-keys',
59 ;;    `icicle-apropos-cycle-previous-action-keys',
60 ;;    `icicle-apropos-cycle-previous-alt-action-keys',
61 ;;    `icicle-apropos-cycle-previous-help-keys',
62 ;;    `icicle-anything-transform-candidates-flag',
63 ;;    `icicle-bookmark-name-length-max',
64 ;;    `icicle-bookmark-refresh-cache-flag', `icicle-buffer-configs',
65 ;;    `icicle-buffer-extras',
66 ;;    `icicle-buffer-ignore-space-prefix-flag',
67 ;;    `icicle-buffer-match-regexp', `icicle-buffer-no-match-regexp',
68 ;;    `icicle-buffer-predicate', `icicle-buffer-require-match-flag'
69 ;;    `icicle-buffer-sort', `icicle-buffers-ido-like-flag',
70 ;;    `icicle-candidate-width-factor',
71 ;;    `icicle-change-region-background-flag',
72 ;;    `icicle-change-sort-order-completion-flag',
73 ;;    `icicle-C-l-uses-completion-flag', `icicle-color-themes',
74 ;;    `icicle-comint-dynamic-complete-replacements',
75 ;;    `icicle-command-abbrev-alist',
76 ;;    `icicle-command-abbrev-match-all-parts-flag',
77 ;;    `icicle-command-abbrev-priority-flag',
78 ;;    `icicle-complete-key-anyway-flag',
79 ;;    `icicle-complete-keys-self-insert-ranges',
80 ;;    `icicle-completing-read+insert-keys',
81 ;;    `icicle-completion-history-max-length',
82 ;;    `icicle-Completions-display-min-input-chars',
83 ;;    `icicle-completions-format',
84 ;;    `icicle-Completions-mouse-3-menu-entries',
85 ;;    `icicle-Completions-text-scale-decrease',
86 ;;    `icicle-Completions-window-max-height',
87 ;;    `icicle-customize-save-flag',
88 ;;    `icicle-customize-save-variable-function',
89 ;;    `icicle-cycle-into-subdirs-flag', `icicle-default-cycling-mode',
90 ;;    `icicle-default-thing-insertion', `icicle-default-value',
91 ;;    `icicle-define-alias-commands-flag',
92 ;;    `icicle-deletion-action-flag', `icicle-dot-show-regexp-flag',
93 ;;    `icicle-dot-string', `icicle-expand-input-to-common-match-flag',
94 ;;    `icicle-file-extras', `icicle-file-match-regexp',
95 ;;    `icicle-file-no-match-regexp', `icicle-file-predicate',
96 ;;    `icicle-file-require-match-flag', `icicle-file-sort',
97 ;;    `icicle-files-ido-like-flag',
98 ;;    `icicle-filesets-as-saved-completion-sets-flag',
99 ;;    `icicle-functions-to-redefine', `icicle-guess-commands-in-path',
100 ;;    `icicle-help-in-mode-line-delay',
101 ;;    `icicle-hide-common-match-in-Completions-flag',
102 ;;    `icicle-hide-non-matching-lines-flag',
103 ;;    `icicle-highlight-historical-candidates-flag',
104 ;;    `icicle-highlight-input-completion-failure',
105 ;;    `icicle-highlight-input-completion-failure-delay',
106 ;;    `icicle-highlight-input-completion-failure-threshold',
107 ;;    `icicle-highlight-input-initial-whitespace-flag',
108 ;;    `icicle-highlight-lighter-flag',
109 ;;    `icicle-highlight-saved-candidates-flag',
110 ;;    `icicle-ignore-comments-flag', `icicle-ignored-directories',
111 ;;    `icicle-ignore-space-prefix-flag',
112 ;;    `icicle-image-files-in-Completions',
113 ;;    `icicle-incremental-completion-delay',
114 ;;    `icicle-incremental-completion-flag',
115 ;;    `icicle-incremental-completion-threshold',
116 ;;    `icicle-inhibit-advice-functions', `icicle-inhibit-ding-flag',
117 ;;    `icicle-input-string', `icicle-inter-candidates-min-spaces',
118 ;;    `icicle-isearch-complete-keys', `icicle-key-complete-keys',
119 ;;    `icicle-key-descriptions-use-<>-flag',
120 ;;    `icicle-key-descriptions-use-angle-brackets-flag',
121 ;;    `icicle-keymaps-for-key-completion', `icicle-kmacro-ring-max',
122 ;;    `icicle-levenshtein-distance', `icicle-list-join-string',
123 ;;    `icicle-list-nth-parts-join-string',
124 ;;    `icicle-mark-position-in-candidate', `icicle-max-candidates',
125 ;;    `icicle-menu-items-to-history-flag',
126 ;;    `icicle-minibuffer-setup-hook', `icicle-modal-cycle-down-keys',
127 ;;    `icicle-modal-cycle-down-action-keys',
128 ;;    `icicle-modal-cycle-down-alt-action-keys',
129 ;;    `icicle-modal-cycle-down-help-keys',
130 ;;    `icicle-modal-cycle-up-keys',
131 ;;    `icicle-modal-cycle-up-action-keys',
132 ;;    `icicle-modal-cycle-up-alt-action-keys',
133 ;;    `icicle-modal-cycle-up-help-keys',
134 ;;    `icicle-move-Completions-frame', `icicle-no-match-hook',
135 ;;    `icicle-option-type-prefix-arg-list',
136 ;;    `icicle-point-position-in-candidate',
137 ;;    `icicle-populate-interactive-history-flag',
138 ;;    `icicle-pp-eval-expression-print-length',
139 ;;    `icicle-pp-eval-expression-print-level',
140 ;;    `icicle-prefix-complete-keys',
141 ;;    `icicle-prefix-complete-no-display-keys',
142 ;;    `icicle-prefix-cycle-next-keys',
143 ;;    `icicle-prefix-cycle-next-action-keys',
144 ;;    `icicle-prefix-cycle-next-alt-action-keys',
145 ;;    `icicle-prefix-cycle-next-help-keys',
146 ;;    `icicle-prefix-cycle-previous-keys',
147 ;;    `icicle-prefix-cycle-previous-action-keys',
148 ;;    `icicle-prefix-cycle-previous-alt-action-keys',
149 ;;    `icicle-prefix-cycle-previous-help-keys',
150 ;;    `icicle-previous-candidate-keys',
151 ;;    `icicle-quote-shell-file-name-flag',
152 ;;    `icicle-read+insert-file-name-keys', `icicle-regexp-quote-flag',
153 ;;    `icicle-regexp-search-ring-max', `icicle-region-background',
154 ;;    `icicle-require-match-flag', `icicle-saved-completion-sets',
155 ;;    `icicle-search-cleanup-flag', `icicle-search-from-isearch-keys',
156 ;;    `icicle-search-highlight-all-current-flag',
157 ;;    `icicle-search-highlight-context-levels-flag',
158 ;;    `icicle-search-highlight-threshold', `icicle-search-hook',
159 ;;    `icicle-search-replace-common-match-flag',
160 ;;    `icicle-search-replace-literally-flag',
161 ;;    `icicle-search-replace-whole-candidate-flag',
162 ;;    `icicle-search-ring-max', `icicle-search-whole-word-flag',
163 ;;    `icicle-shell-command-candidates-cache',
164 ;;    `icicle-show-Completions-help-flag',
165 ;;    `icicle-show-Completions-initially-flag',
166 ;;    `icicle-show-multi-completion-flag', `icicle-sort-comparer',
167 ;;    `icicle-sort-orders-alist', `icicle-special-candidate-regexp',
168 ;;    `icicle-S-TAB-completion-methods-alist',
169 ;;    `icicle-S-TAB-completion-methods-per-command',
170 ;;    `icicle-swank-prefix-length', `icicle-swank-timeout',
171 ;;    `icicle-TAB-completion-methods',
172 ;;    `icicle-TAB-completion-methods-per-command',
173 ;;    `icicle-TAB-shows-candidates-flag', `icicle-recenter',
174 ;;    `icicle-test-for-remote-files-flag',
175 ;;    `icicle-thing-at-point-functions',
176 ;;    `icicle-top-level-key-bindings',
177 ;;    `icicle-top-level-when-sole-completion-delay',
178 ;;    `icicle-top-level-when-sole-completion-flag',
179 ;;    `icicle-touche-pas-aux-menus-flag', `icicle-transform-function',
180 ;;    `icicle-type-actions-alist',
181 ;;    `icicle-unpropertize-completion-result-flag',
182 ;;    `icicle-update-input-hook', `icicle-use-~-for-home-dir-flag',
183 ;;    `icicle-use-C-for-actions-flag',
184 ;;    `icicle-use-anything-candidates-flag',
185 ;;    `icicle-use-candidates-only-once-flag',
186 ;;    `icicle-word-completion-keys',
187 ;;    `icicle-WYSIWYG-Completions-flag', `icicle-yank-function'.
188 ;;
189 ;;  Functions defined here:
190 ;;
191 ;;    `icicle-bind-top-level-commands',
192 ;;    `icicle-buffer-sort-*...*-last',
193 ;;    `icicle-compute-shell-command-candidates', `icicle-remap'.
194 ;;
195 ;;  For descriptions of changes to this file, see `icicles-chg.el'.
196 ;;
197 ;;  Note: Occasionally I have renamed or removed an Icicles option.
198 ;;  If you have customized such an option, then your customization
199 ;;  will no longer have any effect.  With the exception of options
200 ;;  `icicle-mode' and `icicle-mode-hook', library `icicles-opt.el'
201 ;;  always contains the complete set of Icicles options.  If your
202 ;;  custom file or init file contains an Icicles option that is not
203 ;;  listed above, then you can remove it because it is obsolete.
204  
205 ;;(@> "Index")
206 ;;
207 ;;  If you have library `linkd.el' and Emacs 22 or later, load
208 ;;  `linkd.el' and turn on `linkd-mode' now.  It lets you easily
209 ;;  navigate around the sections of this doc.  Linkd mode will
210 ;;  highlight this Index, as well as the cross-references and section
211 ;;  headings throughout this file.  You can get `linkd.el' here:
212 ;;  http://dto.freeshell.org/notebook/Linkd.html.
213 ;;
214 ;;  (@> "Constants used to define user options")
215 ;;  (@> "User options, organized alphabetically, except for dependencies")
216  
217 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
218 ;;
219 ;; This program is free software; you can redistribute it and/or
220 ;; modify it under the terms of the GNU General Public License as
221 ;; published by the Free Software Foundation; either version 2, or (at
222 ;; your option) any later version.
223 ;;
224 ;; This program is distributed in the hope that it will be useful, but
225 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
226 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
227 ;; General Public License for more details.
228 ;;
229 ;; You should have received a copy of the GNU General Public License
230 ;; along with this program; see the file COPYING.  If not, write to
231 ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
232 ;; Floor, Boston, MA 02110-1301, USA.
233 ;;
234 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
235 ;;
236 ;;; Code:
237
238 ;; Emacs 20 does not DTRT wrt `:type' and `:set' sexps at compile time,
239 ;; so there seems no way around this, short of coding without push and dolist.
240 ;; For Emacs < 21: dolist, push
241 (eval-and-compile (when (< emacs-major-version 21) (require 'cl)))
242
243 (require 'thingatpt)        ;; symbol-at-point, thing-at-point, thing-at-point-url-at-point
244 (require 'thingatpt+ nil t) ;; (no error if not found): list-nearest-point-as-string,
245                             ;; region-or-word-nearest-point, symbol-name-nearest-point
246
247 (require 'hexrgb nil t) ;; (no error if not found): hexrgb-approx-equal, hexrgb-saturation 
248 (when (featurep 'hexrgb) (require 'icicles-face))
249   ;; icicle-increment-color-hue, icicle-increment-color-value
250
251 ;; Quiet the byte-compiler.
252 (defvar shell-completion-execonly)      ; In `shell.el'.
253
254 (defvar icicle-mode-map)
255 (defvar icicle-dot-string-internal)
256
257 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
258  
259 ;;(@* "Constants used to define user options")
260
261 ;;; Constants used to define user options --
262
263 ;;;###autoload
264 (defconst icicle-Completions-misc-submenu
265     '(misc-menu
266       menu-item
267       "Miscellaneous"
268       (keymap
269        (complete-for-past-completion menu-item "Complete for Past Completion Input"
270         icicle-retrieve-previous-input
271         :visible (or (and icicle-C-l-uses-completion-flag (not current-prefix-arg))
272                   (and (not icicle-C-l-uses-completion-flag) current-prefix-arg)))
273        (previous-completion-input menu-item "Previous Completion Input"
274         icicle-retrieve-previous-input
275         :visible (not (or (and icicle-C-l-uses-completion-flag (not current-prefix-arg))
276                        (and (not icicle-C-l-uses-completion-flag) current-prefix-arg))))
277        (next-completion-input menu-item "Next Completion Input"
278         icicle-retrieve-next-input)
279        (one-off-eval menu-item "One-Off Eval..."
280         icicle-pp-eval-expression-in-minibuffer)
281        (sep-misc "--")
282        (icicles-help menu-item "Icicles Help" icicle-minibuffer-help)))
283   "Submenu for miscellaneous operations on completions.")
284
285 ;;;###autoload
286 (defconst icicle-Completions-save/retrieve-submenu
287     '(save-retrieve-menu
288       menu-item
289       "Save/Retrieve"
290       (keymap
291        (save-all menu-item "Save All" icicle-candidate-set-save)
292        (save-all-var menu-item "             to Variable..."
293         icicle-candidate-set-save-to-variable)
294        (save-all-cache menu-item "             to Cache File..."
295         icicle-candidate-set-save-persistently)
296        (add-all-to-saved menu-item "Add All to Saved" icicle-candidate-set-save-more)
297        (save-selected menu-item "Save Selected (Region) Candidates"
298         icicle-candidate-set-save-selected
299         :enable (and mark-active (> (region-end) (region-beginning))))
300        (clear-saved menu-item "Clear Saved Candidates"
301         icicle-candidate-set-save-selected
302         :enable (and (boundp 'icicle-saved-completion-candidates)
303                  icicle-saved-completion-candidates))
304        (add-selected-to-saved menu-item "Add Selected (Region) Candidates"
305         icicle-candidate-set-save-more-selected
306         :enable (and mark-active (> (region-end) (region-beginning))))
307        (sep-save/retrieve-2 "--")
308        (retrieve-saved menu-item "Retrieve Saved" icicle-candidate-set-retrieve
309         :enable (and (boundp 'icicle-saved-completion-candidates)
310                  icicle-saved-completion-candidates))
311        (retrieve-more-saved menu-item "Retrieve More Saved"
312         icicle-candidate-set-retrieve-more
313         :enable (and (boundp 'icicle-saved-completion-candidates)
314                  icicle-saved-completion-candidates))))
315   "Submenu for saving and retrieving completion candidates.")
316
317 ;;;###autoload
318 (defconst icicle-Completions-sets-submenu
319     '(sets-menu
320       menu-item
321       "Sets"
322       (keymap
323        (complement menu-item "Complement" icicle-candidate-set-complement)
324        (widen menu-item "Or Match Alternative..." icicle-widen-candidates)
325        (narrow menu-item "Match Also Regexp..." icicle-narrow-candidates)
326        (save-pred-read-var menu-item "Save Predicate to Variable...  (`C-u')"
327         icicle-save-predicate-to-variable
328         :visible current-prefix-arg)
329        (save-pred-std-var menu-item "Save Predicate to `icicle-input-string'"
330         icicle-save-predicate-to-variable
331         :visible (not current-prefix-arg))
332        (intersect menu-item "Intersect Saved" icicle-candidate-set-intersection
333         :enable icicle-saved-completion-candidates)
334        (difference menu-item "Subtract Saved" icicle-candidate-set-difference
335         :enable icicle-saved-completion-candidates)
336        (union menu-item "Add (Union) Saved" icicle-candidate-set-union
337         :enable icicle-saved-completion-candidates)
338        (keep-past-chrono menu-item "Only Previously Entered, By Time  (`C-u')"
339         icicle-keep-only-past-inputs
340         :visible current-prefix-arg)
341        (keep-past-alpha menu-item "Only Previously Entered"
342         icicle-keep-only-past-inputs
343         :visible (not current-prefix-arg))))
344   "Submenu for set operations on completion candidates.")
345
346 ;;;###autoload
347 (defconst icicle-Completions-sorting-submenu
348     '(sorting-menu
349       menu-item
350       "Sorting"
351       (keymap
352        (change-sort-order menu-item "Change Sort Order" icicle-change-sort-order
353         :visible (or (and icicle-change-sort-order-completion-flag (not current-prefix-arg))
354                   (and (not icicle-change-sort-order-completion-flag) current-prefix-arg)))
355        (next-sort-order menu-item "Next Sort Order" icicle-change-sort-order
356         :visible (not (or (and icicle-change-sort-order-completion-flag (not current-prefix-arg))
357                        (and (not icicle-change-sort-order-completion-flag) current-prefix-arg))))
358        (change-alt-sort menu-item "Change Alternative Sort Order  (`M-,')"
359         icicle-change-alternative-sort-order
360         :visible (or (and icicle-change-sort-order-completion-flag (not current-prefix-arg))
361                   (and (not icicle-change-sort-order-completion-flag) current-prefix-arg)))
362        (next-alt-sort menu-item "Next Alternative Sort Order  (`M-,')"
363         icicle-change-alternative-sort-order
364         :visible (not (or (and icicle-change-sort-order-completion-flag (not current-prefix-arg))
365                        (and (not icicle-change-sort-order-completion-flag) current-prefix-arg))))
366        (swap-sort menu-item "Swap Alternative/Normal Sort"
367         icicle-toggle-alternative-sorting)))
368   "Submenu for sorting completion candidates.")
369
370 ;;;###autoload
371 (defconst icicle-Completions-this-candidate-submenu
372     '(this-candidate-menu
373       menu-item
374       "This Candidate"
375       (keymap
376        (help-on-cand menu-item "Help About" icicle-help-on-candidate)
377        (sep-this-1 "--")
378        (action menu-item "Act On  (`C-mouse-2')" icicle-candidate-action)
379        (read-fn-invoke menu-item "Apply a Function To...  (`M-mouse-2')"
380         icicle-candidate-read-fn-invoke)
381        (insert-in-minibuffer menu-item "Insert in Minibuffer  (`C-insert')"
382         (lambda ()
383           (interactive)
384           (select-window (active-minibuffer-window))
385           (goto-char (icicle-minibuffer-prompt-end))
386           (icicle-clear-minibuffer)
387           (insert icicle-last-completion-candidate))
388         :help "Insert candidate in minibuffer")
389        (sep-this-2 "--")
390        (all-cands menu-item "Act on Each Individually" icicle-all-candidates-action)
391        (all-list menu-item "Act on All as a List" icicle-all-candidates-list-action)))
392   "Submenu for acting on candidate under the mouse.")
393
394 ;;;###autoload
395 (defconst icicle-Completions-toggle-submenu
396     '(toggle-menu
397       menu-item
398       "Toggle/Cycle/Change"
399       (keymap
400        (highlighting-past menu-item "Toggle Highlighting Saved Candidates"
401         icicle-toggle-highlight-saved-candidates)
402        (highlighting-past menu-item "Toggle Highlighting Past Inputs"
403         icicle-toggle-highlight-historical-candidates)
404        (removing-dups menu-item "Toggle Duplicate Removal" icicle-toggle-transforming)
405        (case-sensitivity menu-item "Toggle Case Sensitivity  (`C-A')"
406         icicle-toggle-case-sensitivity)
407        ;; This one is not a toggle or cycle.
408        (regexp-quote-input menu-item "Regexp-Quote Current Input"
409         icicle-regexp-quote-input
410         :visible (not (and mark-active (> (region-end) (region-beginning)))))
411        ;; This one is not a toggle or cycle.
412        (regexp-quote-region menu-item "Regexp-Quote Input Region"
413         icicle-regexp-quote-input
414         :visible (and mark-active (> (region-end) (region-beginning))))
415        (matching-of-newlines menu-item "Toggle `.' Matching of Newlines Too"
416         icicle-toggle-dot)
417        (literal-vs-regexp menu-item "Toggle Escaping Special Regexp Chars"
418         icicle-toggle-regexp-quote)
419        (incremental-completion menu-item "Toggle Incremental Completion"
420         icicle-toggle-incremental-completion)
421        (expanding-to-common menu-item "Toggle Common Match Expansion"
422         icicle-toggle-expand-to-common-match)
423        (hiding-non-matching-lines menu-item "Toggle Hiding Non-Matching Lines"
424         icicle-toggle-hiding-non-matching-lines)
425        (hiding-common-match menu-item "Toggle Hiding Common Match"
426         icicle-toggle-hiding-common-match)
427        (oneoff-next-S-TAB menu-item "ONE-OFF Next S-TAB Completion Method (`C-u')"
428         icicle-next-S-TAB-completion-method
429         :visible current-prefix-arg)
430        (next-S-TAB menu-item "Next S-TAB Completion Method"
431         icicle-next-S-TAB-completion-method
432         :visible (not current-prefix-arg))
433        (oneoff-next-TAB menu-item "ONE-OFF Next TAB Completion Method (`C-u')"
434         icicle-next-TAB-completion-method
435         :visible current-prefix-arg)
436        (next-TAB menu-item "Next TAB Completion Method"
437         icicle-next-TAB-completion-method
438         :visible (not current-prefix-arg))
439        (next-thumbnail-setting menu-item "Next Image-File Thumbnail Setting"
440         icicle-cycle-image-file-thumbnail)
441        (proxy-candidates menu-item "Toggle Including Proxy Candidates"
442         icicle-toggle-proxy-candidates)
443        (WYSIWYG menu-item "Toggle WYSIWYG for `*Completions*'" icicle-toggle-WYSIWYG-Completions)
444        (angle-brackets menu-item "Toggle Using Angle Brackets" icicle-toggle-angle-brackets)
445        (ignored-files menu-item "Toggle Ignored File Extensions  (`C-.')"
446         icicle-toggle-ignored-extensions)
447        (using-C-for-actions menu-item "Toggle Using `C-' for Actions"
448         icicle-toggle-C-for-actions)
449        (using-~-for-home menu-item "Toggle Using `~' for $HOME"
450         icicle-toggle-~-for-home-dir)
451        (sep-toggle-1 "--")
452        (search-highlight-all menu-item "Toggle All-Current Search Highlighting  (`C-^')"
453         icicle-toggle-highlight-all-current)
454        (search-whole-word menu-item "Toggle Whole-Word Searching  (`M-q')"
455         icicle-toggle-search-whole-word)
456        (search-cleanup menu-item "Toggle Removal of Search Highlighting  (`C-.')"
457         icicle-toggle-search-cleanup)
458        (search-replace-whole menu-item "Toggle Replacing Whole Search Hit  (`M-_')"
459         icicle-toggle-search-replace-whole)
460        (search-replace-common menu-item "Toggle Replacing Expanded Common Match"
461         icicle-toggle-search-replace-common-match)
462        (sep-toggle-2 "--")
463        (option menu-item "+ Toggle Option..." icicle-toggle-option
464         :visible (and current-prefix-arg (wholenump (prefix-numeric-value current-prefix-arg))))
465        (any-var menu-item "+ Toggle Any Variable..." icicle-toggle-option
466         :visible (and current-prefix-arg
467                   (not (wholenump (prefix-numeric-value current-prefix-arg)))))
468        (boolean menu-item "+ Toggle Boolean Option..."
469         :visible (not current-prefix-arg))
470        ;; This one is not a toggle or cycle.
471        (reset-var menu-item "+ Set Any Variable to `nil'..." icicle-reset-option-to-nil
472         :visible current-prefix-arg)
473        ;; This one is not a toggle or cycle.
474        (reset-option menu-item "+ Set Option to `nil'..."icicle-reset-option-to-nil
475         :visible (not current-prefix-arg))
476        ;; This one is not a toggle or cycle.
477        (set-option-to-t menu-item "+ Set Option to `t'..." icicle-set-option-to-t
478         :visible (and current-prefix-arg (wholenump (prefix-numeric-value current-prefix-arg))))
479        ;; This one is not a toggle or cycle.
480        (set-var-to-t menu-item "+ Set Any Variable to `t'..." icicle-set-option-to-t
481         :visible (and current-prefix-arg
482                   (not (wholenump (prefix-numeric-value current-prefix-arg)))))
483        ;; This one is not a toggle or cycle.
484        (set-boolean-to-t menu-item "+ Set Boolean Option to `t'..." icicle-set-option-to-t
485         :visible (not current-prefix-arg))))
486   "Submenu for toggling, cycling or changing a variable or a behavior.")
487  
488 ;;(@* "User options, organized alphabetically, except for dependencies")
489
490 ;;; User options, organized alphabetically, except for dependencies --
491
492 ;;;###autoload
493 (defcustom icicle-act-before-cycle-flag nil
494   "*Non-nil means act on current candidate, then cycle to next/previous.
495 Otherwise (nil), cycle to the next or previous candidate, and then act
496 on it.
497
498 This affects keys such as the following:
499
500  `C-down',   `C-wheel-down',   `C-next',   `C-end',
501  `C-M-down', `C-M-wheel-down', `C-M-next', `C-M-end',
502  `C-S-down', `C-S-wheel-down', `C-S-next', `C-S-end'.
503
504 Note: A few Icicles commands ignore this setting, in order to \"do the
505 right thing\"."
506   :type 'boolean :group 'Icicles-Key-Bindings :group 'Icicles-Miscellaneous)
507
508 ;;;###autoload
509 (defcustom icicle-add-proxy-candidates-flag nil ; Toggle with `C-M-_'.
510   "*Non-nil means to include proxy candidates whenever possible.
511 A proxy candidate is a special candidate (shown in `*Completions*'
512 using face `icicle-special-candidate') whose name is a placeholder for
513 the real candidate.  The proxy candidate typically stands for some
514 value obtained from the cursor position or by some action such as
515 clicking the mouse.  Example candidates include a color or file name,
516 named by proxy candidates such as `*copied foreground*' or `*file at
517 point*'.
518
519 You can toggle this option at any time from the minibuffer using
520 `\\<minibuffer-local-completion-map>\\[icicle-toggle-proxy-candidates]'.  However, for \
521 commands that provide many proxy candidates, if
522 the flag is off initially when input is read, then you must re-invoke
523 the completing command for the new value to take effect.  (This is for
524 performance reasons.)"
525   :type 'boolean :group 'Icicles-Matching)
526
527 ;;;###autoload
528 (defcustom icicle-alternative-actions-alist ()
529   "*Alist of Emacs commands and alternative action functions.
530 This always overrides any alternative action defined by
531 `icicle-candidate-alt-action-fn'.
532
533 Each alist element has the form (COMMAND . FUNCTION), where COMMAND is
534 a command (a symbol) that reads input and FUNCTION is the
535 alternative-action function it uses.  To disable alternative action
536 for a given command, use `ignore' as the FUNCTION.
537
538 This option has no effect on `icicle-all-candidates-list-alt-action',
539 that is, `M-|', but it does affect `C-|'."
540   :type '(alist
541           :key-type   (symbol   :tag "Command")
542           :value-type (function :tag "Alternative action (function)"))
543   :group 'Icicles-Miscellaneous)
544
545 ;;;###autoload
546 (defcustom icicle-alternative-sort-comparer ; Toggle with `C-M-,'.
547   'icicle-historical-alphabetic-p
548   "*An alternative sort function, in place of `icicle-sort-comparer'.
549 You can swap this with `icicle-sort-comparer' at any time by using
550 `icicle-toggle-alternative-sorting' (\\<minibuffer-local-completion-map>\
551 `\\[icicle-toggle-alternative-sorting]' in the minibuffer)."
552   :type '(choice (const :tag "None" nil) function) :group 'Icicles-Completions-Display)
553
554 ;; Must be before `icicle-dot-string'.
555 ;;;###autoload
556 (defconst icicle-anychar-regexp (let ((strg  (copy-sequence "\\(.\\|[\n]\\)")))
557                                   (set-text-properties 0 (length strg)
558                                                        '(display "." face highlight)
559                                                        strg)
560                                   strg)
561   "Regexp that matches any single character, including newline.")
562
563 ;;;###autoload
564 (defcustom icicle-anything-transform-candidates-flag nil
565   "*Non-nil means `icicle-anything' transforms completion candidates.
566 Function `anything-transform-candidates' is used for the transforming.
567
568 The advantage of a nil value is that `icicle-anything' then acts as a
569 multi-command: you can act on multiple candidates, or apply multiple
570 actions for the same candidate, within a single invocation of
571 `icicle-anything' (or related commands).
572
573 The advantage of a non-nil value is that some of the displayed
574 Anything candidates might be more readable.
575
576 This option has no effect if library `anything.el' cannot be loaded."
577   :type 'boolean :group 'Icicles-Completions-Display :group 'Icicles-Matching)
578
579 ;;;###autoload
580 (defcustom icicle-apropos-complete-keys '([S-tab] [S-iso-lefttab]) ; `S-TAB'
581   ;; In Emacs 22 and later, `backtab' is the canonical key that represents both `S-tab' and
582   ;; `S-iso-lefttab', so in principle that could be used in the default value for Emacs 22+.
583   ;;
584   ;; In other words, the following should be sufficient:
585   ;;   (if (> emacs-major-version 21)
586   ;;       '([backtab])
587   ;;     '([S-tab] [S-iso-lefttab]))
588   ;;
589   ;; However, some Emacs 22+ libraries, such as `info.el', are brain-dead and explicitly
590   ;; bind both `backtab' and `S-tab'.  I filed Emacs bug #1281.
591   "*Key sequences to use for `icicle-apropos-complete'.
592 A list of values that each has the same form as a key-sequence
593 argument to `define-key'.  It is a list mainly in order to accommodate
594 different keyboards - for example, `S-tab' and `S-iso-lefttab'."
595   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
596
597 ;;;###autoload
598 (defcustom icicle-apropos-complete-no-display-keys '([C-M-S-tab] ; `C-M-S-TAB'
599                                                      [C-M-S-iso-lefttab])
600   "*Key sequences to use for `icicle-apropos-complete-no-display'.
601 A list of values that each has the same form as a key-sequence
602 argument to `define-key'.  It is a list mainly in order to accommodate
603 different keyboards - for example, `C-M-S-tab' and `C-M-S-iso-lefttab'."
604   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
605
606 ;;;###autoload
607 (defcustom icicle-apropos-cycle-next-keys '([next]) ; `next'
608   "*Key sequences for apropos completion to cycle to the next candidate.
609 A list of values that each has the same form as a key-sequence
610 argument to `define-key'.  It is a list mainly in order to accommodate
611 different keyboards.
612
613 Option `icicle-use-C-for-actions-flag' swaps these keys with
614 `icicle-apropos-cycle-next-action-keys'."
615   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
616
617 ;;;###autoload
618 (defcustom icicle-apropos-cycle-next-action-keys '([C-next]) ; `C-next'
619   "*Keys for apropos completion to cycle next and perform action.
620 A list of values that each has the same form as a key-sequence
621 argument to `define-key'.  It is a list mainly in order to accommodate
622 different keyboards.
623
624 Option `icicle-use-C-for-actions-flag' swaps these keys with
625 `icicle-apropos-cycle-next-keys'."
626   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
627
628 ;;;###autoload
629 (defcustom icicle-apropos-cycle-next-alt-action-keys '([C-S-next]) ; `C-S-next'
630   "*Keys for apropos completion to cycle next and perform alt action.
631 A list of values that each has the same form as a key-sequence
632 argument to `define-key'.  It is a list mainly in order to accommodate
633 different keyboards."
634   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
635
636 ;;;###autoload
637 (defcustom icicle-apropos-cycle-next-help-keys '([(control meta next)]) ; `C-M-next'
638   "*Keys for apropos completion to cycle next and show candidate help.
639 A list of values that each has the same form as a key-sequence
640 argument to `define-key'.  It is a list mainly in order to accommodate
641 different keyboards."
642   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
643
644 ;;;###autoload
645 (defcustom icicle-apropos-cycle-previous-keys '([prior]) ; `prior'
646   "*Key sequences for apropos completion to cycle to the previous candidate.
647 A list of values that each has the same form as a key-sequence
648 argument to `define-key'.  It is a list mainly in order to accommodate
649 different keyboards.
650
651 Option `icicle-use-C-for-actions-flag' swaps these keys with
652 `icicle-apropos-cycle-previous-action-keys'."
653   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
654
655 ;;;###autoload
656 (defcustom icicle-apropos-cycle-previous-action-keys '([C-prior]) ; `C-prior'
657   "*Keys for apropos completion to cycle previous and perform action.
658 A list of values that each has the same form as a key-sequence
659 argument to `define-key'.  It is a list mainly in order to accommodate
660 different keyboards.
661
662 Option `icicle-use-C-for-actions-flag' swaps these keys with
663 `icicle-apropos-cycle-previous-keys'."
664   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
665
666 ;;;###autoload
667 (defcustom icicle-apropos-cycle-previous-alt-action-keys '([C-S-prior]) ; `C-S-prior'
668   "*Keys for apropos completion to cycle previous and perform alt action.
669 A list of values that each has the same form as a key-sequence
670 argument to `define-key'.  It is a list mainly in order to accommodate
671 different keyboards."
672   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
673
674 ;;;###autoload
675 (defcustom icicle-apropos-cycle-previous-help-keys '([(control meta prior)]) ; `C-M-prior'
676   "*Keys for apropos completion to cycle previous and show candidate help.
677 A list of values that each has the same form as a key-sequence
678 argument to `define-key'.  It is a list mainly in order to accommodate
679 different keyboards."
680   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
681
682 ;;;###autoload
683 (defcustom icicle-bookmark-name-length-max 70
684   "*Maximum number of characters used to name a bookmark.
685 When `icicle-bookmark-cmd' is used with a non-negative numeric prefix
686 arg, the name of the bookmark that is set has at most this many chars."
687   :type 'integer :group 'Icicles-Miscellaneous)
688
689 ;;;###autoload
690 (defcustom icicle-bookmark-refresh-cache-flag t
691   "*t means `icicle-bookmark' refreshes the bookmark-list cache.
692 Use nil to speed up `icicle-bookmark(-other-window)' if you have a lot
693 of bookmarks, at the cost of having the bookmark list possibly not be
694 up to date.  Use t if you want to be sure the list is refreshed.
695
696 If nil, the list of bookmarks is updated only if you use `C-u'.
697 If t, the list is always updated unless you use `C-u'.
698
699 This affects only commands such as `icicle-bookmark' that use the full
700 bookmark list.  It does not affect more specific Icicles bookmark
701 commands such as `\\[icicle-bookmark-dired-other-window]' or the use
702 of a negative prefix arg with
703 `\\[icicle-bookmark-cmd]'.
704
705 Regardless of the option value, the cache is refreshed whenever you
706 use `S-delete' to delete a candidate bookmark."
707   :type 'boolean :group 'Icicles-Completions-Display :group 'Icicles-Matching)
708
709 ;;;###autoload
710 (defcustom icicle-buffer-extras nil
711   "*List of additional buffer-name candidates added to the normal list.
712 List elements are strings."
713   :type '(repeat string) :group 'Icicles-Buffers :group 'Icicles-Matching)
714
715 ;;;###autoload
716 (defcustom icicle-buffer-ignore-space-prefix-flag t
717   "*Override `icicle-ignore-space-prefix-flag' for `icicle-buffer*'.
718 Note: This option is provided mainly for use (binding) in
719 `icicle-define-command' and `icicle-define-file-command'.
720 You probably do not want to set this globally, but you can."
721   :type 'boolean :group 'Icicles-Buffers :group 'Icicles-Matching)
722
723 ;;;###autoload
724 (defcustom icicle-buffer-match-regexp nil
725   "*nil or a regexp that buffer-name completion candidates must match.
726 If nil, then this does nothing.  If a regexp, then show only
727 candidates that match it (and match the user input).
728 See also `icicle-buffer-no-match-regexp'."
729   :type '(choice (const :tag "None" nil) regexp)
730   :group 'Icicles-Buffers :group 'Icicles-Matching)
731
732 ;;;###autoload
733 (defcustom icicle-buffer-no-match-regexp nil
734   "*nil or a regexp that buffer-name completion candidates must not match.
735 If nil, then this does nothing.  If a regexp, then show only
736 candidates that do not match it.
737 See also `icicle-buffer-match-regexp'."
738   :type '(choice (const :tag "None" nil) regexp)
739   :group 'Icicles-Buffers :group 'Icicles-Matching)
740
741 ;;;###autoload
742 (defcustom icicle-buffer-predicate nil
743   "*nil or a predicate that buffer-name candidates must satisfy.
744 If nil, then this does nothing.  Otherwise, this is a function of one
745 argument, a candidate, and only candidates that satisfy the predicate
746 are displayed.  For example, this value will show only buffers that
747 are associated with files:
748
749   (lambda (bufname) (buffer-file-name (get-buffer bufname)))
750
751 This predicate is applied after matching against user input.  It thus
752 corresponds to `icicle-must-pass-after-match-predicate', not to
753 `icicle-must-pass-predicate'."
754   :type '(choice (const :tag "None" nil) function)
755   :group 'Icicles-Buffers :group 'Icicles-Matching)
756
757 ;;;###autoload
758 (defcustom icicle-buffer-require-match-flag nil
759   "*Override `icicle-require-match-flag' for `icicle-buffer*' commands.
760 Controls the REQUIRE-MATCH arg to `completing-read' and `read-file-name'.
761 The possible values are as follows:
762 - nil means this option imposes nothing on completion;
763   the REQUIRE-MATCH argument provided to the function governs behavior
764 - `no-match-required' means the same as a nil value for REQUIRE-MATCH
765 - `partial-match-ok' means the same as a t value for REQUIRE-MATCH
766 - `full-match-required' means the same as a non-nil, non-t value for
767   REQUIRE-MATCH
768
769 Note: This option is provided mainly for use (binding) in
770 `icicle-define-command' and `icicle-define-file-command'.
771 You probably do not want to set this globally, but you can."
772   :type '(choice
773           (const :tag "Do not impose any match behavior"   nil)
774           (const :tag "Do not require a match"             no-match-required)
775           (const :tag "Require a partial match, with RET"  partial-match-ok)
776           (const :tag "Require a full match"               full-match-required))
777   :group 'Icicles-Buffers :group 'Icicles-Matching)
778
779 ;;;###autoload
780 (defcustom icicle-buffer-sort 'icicle-buffer-sort-*...*-last
781   "*A sort function for buffer names, or nil.
782 Examples of sort functions are `icicle-buffer-sort-*...*-last' and
783 `string<'.  If nil, then buffer names are not sorted."
784   :type '(choice (const :tag "None" nil) function)
785   :group 'Icicles-Buffers :group 'Icicles-Completions-Display)
786
787 ;;;###autoload
788 (defcustom icicle-buffers-ido-like-flag nil
789   "*t means `icicle-buffer' and similar commands act more Ido-like.
790 Specifically, those commands then bind these options to t:
791  `icicle-show-Completions-initially-flag'
792  `icicle-top-level-when-sole-completion-flag'
793  `icicle-default-value'"
794   :type 'boolean
795   :group 'Icicles-Buffers :group 'Icicles-Completions-Display :group 'Icicles-Matching)
796
797 ;;;###autoload
798 (defcustom icicle-candidate-width-factor 80
799   "*Percentage of widest candidate width to use for calculating columns.
800 The number of columns of candidates displayed in `*Completions*' is no
801 more than the window width divided by this percentage of the maximum
802 candidate width.
803
804 Increasing this toward 100 spreads columns out. Decreasing it
805 compresses columns together.  The higher the value, the more
806 candidates will form well-defined columns, but the likelier that
807 horizontal space will be wasted between them.  The lower the value,
808 the more candidates will not line up in columns, but the less
809 horizontal space will be wasted between them.
810
811 When most candidates are almost as wide as the widest candidate, a
812 high value works well.  When most candidates are much shorter than the
813 widest candidate, a low value works well.
814
815 If you use Do Re Mi (library `doremi.el'), then you can modify this
816 option incrementally during completion, seeing the effect as it
817 changes.  Use `C-x w' from the minibuffer, then use the `right' and
818 `left' arrow keys or the mouse wheel to increment and decrement the
819 value.  WYSIWYG.
820
821 See also option `icicle-inter-candidates-min-spaces' and (starting
822 with Emacs 23) option `icicle-Completions-text-scale-decrease'."
823   :type 'integer :group 'Icicles-Completions-Display)
824
825 ;; Must be before `icicle-change-region-background-flag'.
826 ;;;###autoload
827 (defcustom icicle-mark-position-in-candidate 'input-end
828   "*Position of mark when you cycle through completion candidates.
829 This is the mark position in the minibuffer.
830 Possible values are those for `icicle-point-position-in-candidate'."
831   :type '(choice
832           (const :tag "Leave mark at the beginning of the minibuffer input"  input-start)
833           (const :tag "Leave mark at the end of the minibuffer input"        input-end)
834           (const :tag "Leave mark at the beginning of the completion root"   root-start)
835           (const :tag "Leave mark at the end of the completion root"         root-end))
836   :group 'Icicles-Minibuffer-Display)
837
838 ;; Must be before `icicle-change-region-background-flag'.
839 ;;;###autoload
840 (defcustom icicle-point-position-in-candidate 'root-end
841   "*Position of cursor when you cycle through completion candidates.
842 This is the cursor position in the minibuffer.
843 Possible values are:
844  `input-start': beginning of the minibuffer input
845  `input-end':   end of the minibuffer input
846  `root-start':  beginning of the completion root
847  `root-end':    end of the completion root
848 When input is expected to be a file name, `input-start' is just after
849 the directory, which is added automatically during completion cycling.
850 See also `icicle-mark-position-in-candidate'."
851   :type '(choice
852           (const :tag "Leave cursor at the beginning of the minibuffer input"  input-start)
853           (const :tag "Leave cursor at the end of the minibuffer input"        input-end)
854           (const :tag "Leave cursor at the beginning of the completion root"   root-start)
855           (const :tag "Leave cursor at the end of the completion root"         root-end))
856   :group 'Icicles-Minibuffer-Display)
857
858 ;;;###autoload
859 (defcustom icicle-change-region-background-flag
860   (not (eq icicle-point-position-in-candidate icicle-mark-position-in-candidate))
861   "*Non-nil means use color `icicle-region-background' during input.
862 See `icicle-region-background'.  If you load library `hexrgb.el'
863 before Icicles, then `icicle-region-background' will be a slightly
864 different hue from your normal background color.  This makes
865 minibuffer input easier to read than if your normal `region' face were
866 used.  This has an effect only during minibuffer input.  A non-nil
867 value for this option is particularly useful if you use
868 delete-selection mode."
869   :type 'boolean :group 'Icicles-Minibuffer-Display)
870
871 ;;;###autoload
872 (defcustom icicle-change-sort-order-completion-flag nil
873   "*Non-nil means `icicle-change-sort-order' uses completion, by default.
874 Otherwise, it cycles among the possible sort orders.  You can override
875 the behavior by using `C-u' with `icicle-change-sort-order'."
876   :type 'boolean :group 'Icicles-Completions-Display :group 'Icicles-Matching)
877
878 ;;;###autoload
879 (defcustom icicle-C-l-uses-completion-flag nil
880   "*Non-nil means \\<minibuffer-local-completion-map>\
881 `\\[icicle-retrieve-previous-input]' uses completion for choosing completion history
882 entries, by default.  Otherwise, it cycles among the possible previous
883 inputs.  You can override the behavior by using `C-u' with `\\[icicle-retrieve-previous-input]'."
884   :type 'boolean :group 'Icicles-Minibuffer-Display :group 'Icicles-Matching)
885
886 ;; Replace this list by your favorite color themes. Each must be the name of a defined function.
887 ;; By default, this includes all color themes defined globally (variable `color-themes').
888 ;;
889 ;; NOTE: We need the `condition-case' because of a BUG in `directory-files' for Emacs 20.
890 ;; Bug reported to `color-theme.el' maintainer 2009-11-22.  The problem is that the default value
891 ;; of `color-theme-libraries' concats `file-name-directory', which ends in `/', with `/themes',
892 ;; not with `themes'.  So the result is `...//themes'.  That is tolerated by Emacs 21+
893 ;; `directory-files', but not for Emacs 20.  Until this `color-theme.el' bug is fixed, Emacs 20
894 ;; users will need to manually load `color-theme-libraries.el'.
895 ;;;###autoload
896 (defcustom icicle-color-themes ()
897   "*List of color themes to cycle through using `M-x icicle-color-theme'.
898 Note: Starting with Color Theme version 6.6.0, you will need to put
899 library `color-theme-library.el', as well as library `color-theme.el',
900 in your `load-path'."
901   :type 'hook :group 'Icicles-Miscellaneous)
902
903 ;;;###autoload
904 (defcustom icicle-comint-dynamic-complete-replacements
905   '((comint-dynamic-complete-filename    'icicle-comint-dynamic-complete-filename)
906     (shell-dynamic-complete-command      'icicle-shell-dynamic-complete-command)
907     (shell-dynamic-complete-environment-variable
908      'icicle-shell-dynamic-complete-environment-variable)
909     (shell-dynamic-complete-filename     'icicle-shell-dynamic-complete-filename)
910     (ess-complete-filename               'icicle-ess-complete-filename)
911     (ess-complete-object-name            'icicle-ess-complete-object-name)
912     )
913   "*List of function replacements for `comint-dynamic-complete-functions'.
914 Instead of using `comint-dynamic-complete-functions' as is, command
915 `icicle-comint-dynamic-complete' replaces functions in that list
916 according to the value of this option.
917
918 Each option list element is itself a list of two elements.  The first
919 is a function to replace (a symbol), and the second is the replacement
920 function (a sexp that evaluates to a function).  For example, this
921 list element says to replace completion function `foo' by completion
922 function `my-foo': (foo 'my-foo).
923
924 You can use this option to provide Icicles completion for various
925 modes that inherit from Comint mode or otherwise use
926 `comint-dynamic-complete'."
927   :type '(repeat (list symbol sexp)) :group 'Icicles-Miscellaneous)
928
929 ;;;###autoload
930 (defcustom icicle-command-abbrev-alist ()
931   "*Alist of command abbreviations and commands, with frequency of use.
932 Each element has the form (COMMAND ABBREV N), where ABBREV is an
933 abbreviation of COMMAND and N is the number of times COMMAND has been
934 invoked via ABBREV.  Both COMMAND and ABBREV are symbols."
935   :type '(alist :key-type symbol :value-type (list symbol integer)) :group 'Icicles-Matching)
936
937 ;;;###autoload
938 (defcustom icicle-command-abbrev-match-all-parts-flag nil
939   "*Non-nil means `icicle-command-abbrev' matches each command-name part.
940 Otherwise, an abbrev need match only a prefix of the command name."
941   :type 'boolean :group 'Icicles-Matching)
942
943 ;;;###autoload
944 (defcustom icicle-command-abbrev-priority-flag nil
945   "*nil means commands take precedence over abbreviations for `\\<icicle-mode-map>\
946 \\[icicle-command-abbrev]'."
947   :type 'boolean :group 'Icicles-Matching)
948
949 ;;;###autoload
950 (defcustom icicle-complete-key-anyway-flag nil
951   "*Non-nil means bind `S-TAB' for key completion even if already
952 bound.  If nil, then each of the keys in `icicle-key-complete-keys' is
953 bound to `icicle-complete-keys' in each keymap of
954 `icicle-keymaps-for-key-completion' only if `S-TAB' is not already
955 bound in the keymap.
956
957 Note: the keys in `icicle-key-complete-keys' are always bound to
958 `icicle-complete-keys' in `icicle-mode-map'.  This option affects only
959 the binding of those keys in `icicle-keymaps-for-key-completion'."
960   :type 'boolean :group 'Icicles-Key-Completion :group 'Icicles-Key-Bindings)
961
962 (when (fboundp 'map-keymap)             ; Emacs 22+.
963   (defcustom icicle-complete-keys-self-insert-ranges ()
964     "*Non-nil means `icicle-complete-keys' includes self-inserting keys.
965 That means keys bound to `self-insert-command'.
966
967 For Emacs 22, this is effectively Boolean: any non-nil value allows
968 all self-inserting keys as candidates.
969
970 In Emacs 23+, there are thousands of self-inserting keys, so it is not
971 practical to allow all as candidates.  Instead, a non-nil value is a
972 list of character ranges of the form (MIN . MAX).  Characters in the
973 inclusive range MIN through MAX are possible key-completion
974 candidates.
975
976 For Emacs 23+, if you use a non-nil value then use only small ranges
977 for better performance, e.g., `((0 . 687))' covers Latin characters.
978
979 In general, leave the value as nil.  Use vanilla Emacs 23+ command
980 `ucs-insert' to insert characters by completing against their Unicode
981 names.  With Icicles key completion you do not complete against the
982 Unicode names.  Instead, you can see the characters in
983 `*Completions*'.
984
985 For reference, below are the ranges supported by `ucs-insert' (Emacs
986 23+).  But unless you have a very powerful computer, choose only only
987 one or two small ranges of characters you actually might use.
988
989 BMP ranges:
990  (0 . 13311)       = (#x0000 . #x33FF)
991  (19904 . 19967)   = (#x4DC0 . #x4DFF)
992  (40960 . 55295)   = (#xA000 . #x0D7FF)
993  (64256 . 65533)   = (#xFB00 . #xFFFD)
994
995 Upper ranges:
996  (65536 . 79103)   = (#x10000 . #x134FF)
997  (118784 . 131071) = (#x1D000 . #x1FFFF)
998  (917504 . 918015) = (#xE0000 . #xE01FF)"
999     :type '(alist :key-type integer :value-type integer) :group 'Icicles-Key-Completion))
1000
1001 ;;;###autoload
1002 (defcustom icicle-completing-read+insert-keys '([(control meta shift ?c)]) ; `C-M-S-c'
1003   "*Key sequences to invoke `icicle-completing-read+insert'.
1004 A list of values that each has the same form as a key-sequence
1005 argument to `define-key'.  It is a list mainly in order to accommodate
1006 different keyboards.
1007
1008 Such a key has no effect unless
1009 `icicle-completing-read+insert-candidates' is non-nil."
1010   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
1011
1012 ;;;###autoload
1013 (defcustom icicle-completion-history-max-length (if icicle-C-l-uses-completion-flag 1000 100)
1014   "*Maximum number of inputs to save in the completion history.
1015 This is the history that you access using \\<minibuffer-local-completion-map>\
1016 `\\[icicle-retrieve-previous-input]' and `\\[icicle-retrieve-next-input]'."
1017   :type 'integer :group 'Icicles-Miscellaneous)
1018
1019 ;;;###autoload
1020 (defcustom icicle-Completions-display-min-input-chars 0
1021   "*`*Completions*' window is removed if fewer chars than this are input.
1022 You might want to set this to, say 1 or 2, to avoid display of a large
1023 set of candidates during incremental completion.  The default value of
1024 0 causes this option to have no effect: `*Completions*' is never
1025 removed based only on the number of input characters."
1026   :type 'integer :group 'Icicles-Completions-Display)
1027
1028 ;;;###autoload
1029 (defcustom icicle-completions-format (if (boundp 'completions-format) ; Defined in Emacs 23+.
1030                                          completions-format
1031                                        'horizontal)  
1032   "*Layout of completion candidates in buffer `*Completions*'.
1033 `vertical' means display down columns first, then to the right.
1034 `horizontal' or nil means display across rows first, then down.
1035
1036 Note that multi-line candidates are always displayed in a single
1037 column, and in this case it makes no difference what the value of the
1038 option is - the effect is the same."
1039   :type '(choice
1040           (const :tag "Display vertically"    vertical)
1041           (other :tag "Display horizontally"  horizontal))
1042   :group 'Icicles-Completions-Display)
1043
1044 ;;;###autoload
1045 (defcustom icicle-move-Completions-frame 'right
1046   "*Non-nil means move `*Completions*' frame to the edge of the display.
1047 This is done by `icicle-candidate-action'.
1048 It only happens if `*Completions*' is alone in its frame.
1049 This can be useful to make `*Completions*' more visible.
1050 Possible values are `right', `left', and nil (do not move)."
1051   :type '(choice
1052           (const :tag "Move to right edge"  right)
1053           (const :tag "Move to right edge"  left)
1054           (const :tag "Do not move"         nil))
1055   :group 'Icicles-Completions-Display)
1056
1057 ;;;###autoload
1058 (defcustom icicle-Completions-mouse-3-menu-entries `(,icicle-Completions-this-candidate-submenu
1059                                                      ,icicle-Completions-sorting-submenu
1060                                                      ,icicle-Completions-save/retrieve-submenu
1061                                                      ,icicle-Completions-sets-submenu
1062                                                      ,icicle-Completions-toggle-submenu
1063                                                      ,icicle-Completions-misc-submenu)
1064   "*Entries for the `mouse-3' popup menu in `*Completions*'.
1065 The menu is created by `icicle-Completions-mouse-3-menu'.
1066
1067 The option value is a list.  Each element defines a submenu or a menu
1068 item.  A null element (`nil') is ignored.
1069
1070 Several alternative entry formats are available.  When customizing,
1071 choose an alternative in the Customize `Value Menu'.
1072
1073 In this description:
1074  SYMBOL      is a symbol identifying the menu entry.
1075  `menu-item' is just that text, literally.
1076  NAME        is a string naming the menu item or submenu.
1077  COMMAND     is the command to be invoked by an item.
1078  MENU-KEYMAP is a menu keymap or a var whose value is a menu keymap.
1079  KEYWORDS    is a property list of menu keywords (`:enable',
1080              `:visible', `:filter', `:keys', etc.).
1081
1082 1. Single menu item.  For a selectable item, use
1083    (SYMBOL menu-item NAME COMMAND . KEYWORDS).  For a non-selectable
1084    item such as a separator, use (SYMBOL NAME) or
1085    (SYMBOL menu-item NAME nil . KEYWORDS).
1086
1087 2. Items taken from a menu-keymap variable, such as
1088    `menu-bar-edit-menu'.  Just use the name of the variable (a
1089    symbol).  The items appear at the top level of the popup menu, not
1090    in a submenu.
1091
1092 3. Submenu.  Use (SYMBOL menu-item NAME MENU-KEYMAP . KEYWORDS) or
1093    (SYMBOL NAME . MENU-KEYMAP).  Remember that MENU-KEYMAP can also be
1094    a variable (symbol) whose value is a menu keymap.
1095
1096 All of these are standard menu elements, with the exception of the use
1097 of a keymap variable to represent its value.
1098
1099 See also:
1100  * (elisp) Format of Keymaps
1101  * (elisp) Classifying Events
1102  * (elisp) Extended Menu Items
1103
1104 Example submenu element:
1105  (toto menu-item \"Toto\" menu-bar-toto-menu)
1106
1107 Example selectable menu-item element:
1108  (foo menu-item \"Foo\"   foo-command
1109        :visible (not buffer-read-only))"
1110   :type  '(repeat
1111            (choice
1112             ;; These could be combined, but it's better for users to see separate choices.
1113             (restricted-sexp
1114              :tag "Submenu (SYMBOL menu-item NAME MENU-KEYMAP . KEYWORDS) or (SYMBOL NAME . MENU-KEYMAP)"
1115              :match-alternatives
1116              ((lambda (x)
1117                 (and (consp x) (symbolp (car x))
1118                      (or (and (stringp (cadr x)) (cddr x)) ; (SYMBOL NAME . MENU-KEYMAP)
1119                          ;; (SYMBOL menu-item NAME MENU-KEYMAP . KEYWORDS)
1120                          (and (eq 'menu-item (cadr x))
1121                               (stringp (car (cddr x)))
1122                               (or (keymapp (car (cdr (cddr x)))) ; Can be a keymap var.
1123                                   (and (symbolp (car (cdr (cddr x))))
1124                                        (boundp (car (cdr (cddr x))))
1125                                        (keymapp (symbol-value (car (cdr (cddr x)))))))))))
1126               'nil))
1127             (restricted-sexp
1128              :tag "Items from a keymap variable's value."
1129              :match-alternatives ((lambda (x) (and (symbolp x) (keymapp (symbol-value x))))
1130                                   'nil))
1131             (restricted-sexp
1132              :tag "Selectable item (SYMBOL menu-item NAME COMMAND . KEYWORDS)"
1133              :match-alternatives ((lambda (x) (and (consp x) (symbolp (car x))
1134                                                    (eq 'menu-item (cadr x))
1135                                                    (stringp (car (cddr x)))
1136                                                    (commandp (car (cdr (cddr x))))))
1137                                   'nil))
1138             (restricted-sexp
1139              :tag "Non-selectable item (SYMBOL NAME) or (SYMBOL menu-item NAME nil . KEYWORDS)"
1140              :match-alternatives ((lambda (x) (and (consp x) (symbolp (car x))
1141                                                    (or (and (stringp (cadr x)) (null (caddr x)))
1142                                                        (and (eq 'menu-item (cadr x))
1143                                                             (stringp (car (cddr x)))
1144                                                             (null (car (cdr (cddr x))))))))
1145                                   'nil))))
1146   :group 'Icicles-Completions-Display)
1147
1148 (when (fboundp 'text-scale-decrease)    ; Emacs 23+
1149   (defcustom icicle-Completions-text-scale-decrease 0.75
1150     "*Initial height decrease for text in buffer `*Completions*'.
1151 A value of 0.0 means the height is not decreased at all.
1152 This is used as the argument to function `text-scale-decrease'.
1153 If you use library `doremi-frm.el', you can use `C-x -' to
1154 incrementally resize the text during completion.
1155
1156 See also options `icicle-candidate-width-factor' and
1157 `icicle-inter-candidates-min-spaces'."
1158     :type 'number :group 'Icicles-Completions-Display))
1159
1160 ;;;###autoload
1161 (defcustom icicle-Completions-window-max-height 30
1162   "*Maximum height of `*Completions*' window, in lines.
1163 The window is fit to the buffer size, with this as maximum height.
1164 Not used if `*Completions*' is a special buffer with its own frame.
1165 Not used in Emacs releases prior to 21."
1166   :type 'integer :group 'Icicles-Completions-Display)
1167
1168 ;;;###autoload
1169 (defcustom icicle-customize-save-flag t
1170   "*Non-nil means save some updated Icicles options when you quit Emacs.
1171 That is, add some functions to `kill-emacs-hook' that call
1172 `customize-save-variable'.  Currently, this includes only function
1173 `icicle-command-abbrev-save', which saves updated option
1174 `icicle-command-abbrev-alist'."
1175   :type 'boolean :group 'Icicles-Minibuffer-Display)
1176
1177 ;;;###autoload
1178 (defcustom icicle-customize-save-variable-function 'customize-save-variable
1179   "*Function used to save user option changes.
1180 I RECOMMEND that you do NOT change this.
1181
1182 The option value is a function that has the same signature as
1183 `customize-save-variable' (perhaps with additional arguments after VAR
1184 and VAL, the variable to save and its new value.
1185
1186 If you do not want changes that Icicles commands make to certain user
1187 options to be saved automatically, you can set this to the function
1188 \(symbol) `ignore'.  If you want to use your own function to somehow
1189 save the current value, you can set this to your function."
1190   :type 'function :group 'Icicles-Miscellaneous)
1191
1192 ;;;###autoload
1193 (defcustom icicle-cycle-into-subdirs-flag nil
1194   "*Non-nil means minibuffer-input cycling explores subdirectories.
1195 If this is non-nil, then you might want to use a function such as
1196 `icicle-dirs-last-p' for option `icicle-sort-comparer', to prevent
1197 cycling into subdirectories depth first.  Command
1198 `icicle-sort-by-directories-last' does that."
1199   :type 'boolean :group 'Icicles-Miscellaneous)
1200
1201 ;;;###autoload
1202 (defcustom icicle-default-cycling-mode 'prefix
1203   "*Default completion mode for per-mode cycling.
1204 When you hit a completion key (`TAB' or `S-TAB'), it sets the current
1205 completion mode (prefix or apropos, respectively).  That determines
1206 the kind of completion to be used by the per-mode cycling keys.
1207
1208 This option controls which completion mode to use if you cycle using a
1209 per-mode key (e.g. `down') *before* hitting a completion key.
1210
1211  - `prefix'  means cycle prefix completions
1212  - `apropos' means cycle apropos completions
1213  - Any other non-nil value means cycle inputs from the input history
1214  - nil means do not cycle - you must first hit a completion key
1215
1216 The per-mode cycling keys are the values of
1217 `icicle-modal-cycle-up-keys' (backward) and
1218 `icicle-modal-cycle-down-keys' (forward).  By default, these are keys
1219 `up' and `down' as well as the mouse wheel.
1220
1221 For example, if the value is `prefix' (the default) then you can
1222 immediately cycle prefix completions using `up', `down', or the mouse
1223 wheel, without first hitting `TAB'.
1224
1225 Once you have used `TAB' or `S-TAB', the only way to traverse the
1226 history is using `M-p' and `M-n' (they always traverse the history).
1227
1228 This option affects only cycling with the per-mode keys.  You can
1229 always use the mode-specific cycling keys instead to cycle according
1230 to a particular mode.  The mode-specific keys are (by default):
1231
1232  - `end'  and `home'  for prefix completion
1233  - `next' and `prior' for apropos completion
1234
1235 \(By default there is no conflict between the cycling keys that are
1236 mode-specific and those that are per-mode.  But if you customize them
1237 in such a way that you set a key to both, the mode-specific use takes
1238 priority.)
1239
1240 After you change the value of this option, toggle Icicle mode off,
1241 then on again, for the change to take effect in the same session."
1242   :type '(choice
1243           (const :tag "Prefix cycling for per-mode keys, by default"                     prefix)
1244           (const :tag "Apropos cycling for per-mode keys, by default"                    apropos)
1245           (const :tag "No per-mode cycling - invoke completion first (`TAB', `S-TAB')"   nil)
1246           (other :tag "History cycling for per-mode keys, by default"                    t))
1247   :group 'Icicles-Key-Bindings)
1248
1249 ;;;###autoload
1250 (defcustom icicle-default-thing-insertion 'alternatives
1251   "*Behavior of successive `\\<minibuffer-local-map>\\[icicle-insert-string-at-point]'.
1252 If `alternatives', then the next function in the `car' of
1253 `icicle-thing-at-point-functions' is used to retrieve the text to be
1254 inserted.
1255 If `more-of-the-same', then the function that is the `cdr' of
1256 `icicle-thing-at-point-functions' is used to retrieve the text to be
1257 inserted."
1258   :type `(choice
1259           (const :tag ,(substitute-command-keys
1260                         "Successive calls to `\\<minibuffer-local-map>\
1261 \\[icicle-insert-string-at-point]' use different text-grabbing functions.")
1262            alternatives)
1263           (const :tag ,(substitute-command-keys
1264                         "Successive calls to `\\<minibuffer-local-map>\
1265 \\[icicle-insert-string-at-point]' grab more text at point.")
1266            more-of-the-same))
1267   :group 'Icicles-Key-Bindings)
1268
1269 ;; We don't use `define-obsolete-variable-alias' so that byte-compilation in older Emacs
1270 ;; works for newer Emacs too.
1271 (when (fboundp 'defvaralias)            ; Emacs 22+
1272   (defvaralias 'icicle-init-value-flag 'icicle-default-value)
1273   (make-obsolete-variable 'icicle-init-value-flag 'icicle-default-value "2008-04-18"))
1274
1275 ;;;###autoload
1276 (defcustom icicle-default-value t
1277   "*How to treat the default value when reading minibuffer input.
1278
1279 When the default value argument to functions such as
1280 `completing-read', `read-file-name', `read-from-minibuffer', and
1281 `read-string' is non-nil and the initial-input argument is nil or
1282 \"\", the default value can be added to the prompt as a hint or
1283 inserted into the minibuffer as the initial input.
1284
1285 Adding it to the prompt is the default behavior and corresponds to the
1286 behavior of vanilla Emacs.
1287
1288 Inserting the default value in the minibuffer as the initial input has
1289 the advantage of not requiring you to use `M-n' to retrieve it.  It
1290 has the disadvantage of making you use `M-p' (or do something else) to
1291 get rid of the default value in the minibuffer if you do not want to
1292 use or edit it.  If you often want to use or edit the default value,
1293 then set `icicle-default-value' to non-nil and non-t.  If you rarely
1294 do so, then set it to nil or t.
1295
1296 If inserted in the minibuffer, the value of this option also
1297 determines whether or not the inserted text is preselected and where
1298 the cursor is left: at the beginning or end of the text.
1299
1300 These are the possible option values:
1301
1302   nil               - Do not insert default value or add it to prompt.
1303   t                 - Add default value to prompt.  Do not insert it.
1304   `insert-start'    - Insert default value and leave cursor at start.
1305   `insert-end'      - Insert default value and leave cursor at end.
1306   `preselect-start' - Insert and preselect default value;
1307                       leave cursor at beginning.
1308   `preselect-end'   - Insert and preselect default value;
1309                       leave cursor at end.
1310
1311 My own preference is `insert-end'.
1312
1313 Preselection can be useful in Delete Selection mode or PC Selection
1314 mode.  It makes it easy to replace the value by typing characters, or
1315 delete it by hitting `C-d' or `DEL' (backspace).  However, all of the
1316 initial input is lost if you type or hit `C-d' or `DEL'.  That is
1317 inconvenient if you want to keep most of it and edit it only slightly."
1318   :type '(choice
1319           (const :tag "Do not insert default value or add it to prompt"            nil)
1320           (const :tag "Add default value to prompt (do not insert in minibuffer)"  t)
1321           (const :tag "Insert default value.  Leave cursor at beginning"           insert-start)
1322           (const :tag "Insert default value.  Leave cursor at end"                 insert-end)
1323           (const :tag "Insert default value, select it, leave cursor at beginning"
1324            preselect-start)
1325           (const :tag "Insert default value, select it, leave cursor at end"
1326            preselect-end))
1327   :group 'Icicles-Miscellaneous)
1328
1329 ;;;###autoload
1330 (defcustom icicle-define-alias-commands-flag t
1331   "*Non-nil means define some commands that do not begin with `icicle-'.
1332 For convenience, a few top-level commands are defined, typically as
1333 aliases for commands with longer names.  For example, command `toggle'
1334 is defined as an alias for command `icicle-toggle-option'.  In any
1335 case, no such command is ever defined by Icicles if a function with
1336 the same name is already defined."
1337    :type 'boolean :group 'Icicles-Miscellaneous)
1338
1339 ;;;###autoload
1340 (defcustom icicle-deletion-action-flag t
1341   "*Non-nil means `S-delete' during completion deletes the current object.
1342 More precisely, it deletes the object named by the current completion
1343 candidate, if a deletion action is defined for the current command.
1344 If no deletion action is defined, then the value of this option has no
1345 effect.
1346
1347 If you are worried about inadvertently deleting an object by
1348 accidentally hitting `S-delete', you can customize this to nil to
1349 inhibit `S-delete' object deletion during completion."
1350   :type 'boolean :group 'Icicles-Miscellaneous)
1351
1352 ;;;###autoload
1353 (defcustom icicle-dot-show-regexp-flag nil
1354   "*Non-nil means show `icicle-anychar-regexp' explicitly for `.'.
1355 Otherwise, display it as a highlighted `.' only.
1356 This has no effect for Emacs versions prior to 21: acts as if non-nil."
1357   :type 'boolean :group 'Icicles-Matching :group 'Icicles-Minibuffer-Display)
1358
1359 ;;;###autoload
1360 (defcustom icicle-dot-string "."
1361   "*String inserted by `icicle-insert-dot-command'.
1362 It is either \".\" or the value of `icicle-anychar-regexp'.
1363 You can toggle this at any time using command `icicle-toggle-dot',
1364 bound to \\<minibuffer-local-completion-map>`\\[icicle-toggle-dot]' during completion."
1365   :set #'(lambda (sym defs)
1366            (custom-set-default sym defs)
1367            (setq icicle-dot-string-internal  icicle-dot-string))
1368   :type `(choice
1369           (const :tag "Match any char EXCEPT newline"       ".")
1370           (const :tag "Match any char, including NEWLINE"   ,icicle-anychar-regexp))
1371   :group 'Icicles-Matching :group 'Icicles-Minibuffer-Display)
1372
1373 ;;;###autoload
1374 (defcustom icicle-expand-input-to-common-match-flag t ; Toggle with `C-;'.
1375   "*Non-nil means `S-TAB' expands input, still matching all candidates.
1376 The expansion replaces your input in the minibuffer.
1377
1378 Your expanded input is typically the longest substring common to all
1379 completion candidates and that matches your (complete) input pattern.
1380
1381 If you want to edit your original input, use \\<minibuffer-local-completion-map>\
1382 `\\[icicle-retrieve-previous-input]'.
1383
1384 For apropos completion, your input is, in general, a regexp.  Setting
1385 this option to nil will let you always work with a regexp in the
1386 minibuffer for apropos completion - your regexp is then never replaced
1387 by the expanded common match.
1388
1389 You can toggle this option at any time from the minibuffer using
1390 `C-;'."
1391   :type 'boolean :group 'Icicles-Matching)
1392
1393 ;;;###autoload
1394 (defcustom icicle-file-extras nil
1395   "*List of additional file-name candidates added to the normal list.
1396 List elements are strings."
1397   :type '(repeat string) :group 'Icicles-Files :group 'Icicles-Matching)
1398
1399 ;;;###autoload
1400 (defcustom icicle-file-match-regexp nil
1401   "*nil or a regexp that file-name completion candidates must match.
1402 If nil, then this does nothing.  If a regexp, then show only
1403 candidates that match it (and match the user input).
1404 See also `icicle-file-no-match-regexp'."
1405   :type '(choice (const :tag "None" nil) regexp)
1406   :group 'Icicles-Files :group 'Icicles-Matching)
1407
1408 ;;;###autoload
1409 (defcustom icicle-file-no-match-regexp nil
1410   "*nil or a regexp that file-name completion candidates must not match.
1411 If nil, then this does nothing.  If a regexp, then show only
1412 candidates that do not match it.
1413 See also `icicle-file-match-regexp'."
1414   :type '(choice (const :tag "None" nil) regexp)
1415   :group 'Icicles-Files :group 'Icicles-Matching)
1416
1417 ;;;###autoload
1418 (defcustom icicle-file-predicate nil
1419   "*nil or a predicate that file-name candidates must satisfy.
1420 If nil, then this does nothing.  Otherwise, this is a function of one
1421 argument, a candidate, and only candidates that satisfy the predicate
1422 are displayed.  For example, this value will show only names of files
1423 with more than 5000 bytes:
1424
1425   (lambda (fil) (> (nth 5 (file-attributes file)) 5000))
1426
1427 This predicate is applied after matching against user input.  It thus
1428 corresponds to `icicle-must-pass-after-match-predicate', not to
1429 `icicle-must-pass-predicate'."
1430   :type '(choice (const :tag "None" nil) function)
1431   :group 'Icicles-Files :group 'Icicles-Matching)
1432
1433 ;;;###autoload
1434 (defcustom icicle-file-require-match-flag nil
1435   "*Override `icicle-require-match-flag' for file-name completion.
1436 The possible values are as follows:
1437 - nil means this option imposes nothing on completion;
1438   the REQUIRE-MATCH argument provided to the function governs behavior
1439 - `no-match-required' means the same as a nil value for REQUIRE-MATCH
1440 - `partial-match-ok' means the same as a t value for REQUIRE-MATCH
1441 - `full-match-required' means the same as a non-nil, non-t value for
1442   REQUIRE-MATCH
1443
1444 Note: This option is provided mainly for use (binding) in
1445 `icicle-define-command' and `icicle-define-file-command'.
1446 You probably do not want to set this globally, but you can."
1447   :type '(choice
1448           (const :tag "Do not impose any match behavior"   nil)
1449           (const :tag "Do not require a match"             no-match-required)
1450           (const :tag "Require a partial match, with RET"  partial-match-ok)
1451           (const :tag "Require a full match"               full-match-required))
1452   :group 'Icicles-Files :group 'Icicles-Matching)
1453
1454 ;;;###autoload
1455 (defcustom icicle-file-sort nil
1456   "*A sort function for file names, or nil.
1457 Examples of sort functions are `icicle-dirs-last-p' and
1458 `icicle-last-modified-first-p'.  If nil, then file names are not
1459 sorted."
1460   :type '(choice (const :tag "None" nil) function)
1461   :group 'Icicles-Files :group 'Icicles-Completions-Display)
1462
1463 ;;;###autoload
1464 (defcustom icicle-files-ido-like-flag nil
1465   "*t means `icicle-file' and similar commands act more Ido-like.
1466 Specifically, those commands then bind these options to t:
1467  `icicle-show-Completions-initially-flag'
1468  `icicle-top-level-when-sole-completion-flag'
1469  `icicle-default-value'"
1470   :type 'boolean
1471   :group 'Icicles-Files :group 'Icicles-Completions-Display :group 'Icicles-Matching)
1472
1473 ;;;###autoload
1474 (defcustom icicle-filesets-as-saved-completion-sets-flag t
1475   "*Non-nil means you can use filesets to save candidates persistently.
1476 This means that you can save file-name candidates in a persistent
1477 Icicles saved completion set (cache file) or in in an Emacs fileset.
1478 It also means that an Icicles persistent completion set can contain
1479 filesets, in addition to file names: any number of filesets, and
1480 filesets of different type.  Available only for Emacs 22 and later,
1481 and you must load library `filesets.el'."
1482   :type 'boolean :group 'Icicles-Matching)
1483
1484 ;;;###autoload
1485 (defcustom icicle-functions-to-redefine
1486   '(bbdb-complete-name                   comint-dynamic-complete
1487     comint-dynamic-complete-filename     comint-replace-by-expanded-filename
1488     customize-apropos                    customize-apropos-faces
1489     customize-apropos-groups             customize-apropos-options
1490     customize-apropos-options-of-type    customize-face
1491     customize-face-other-window          dabbrev-completion
1492     ;; Use these two if you want Icicles completion for shell commands.
1493     ;; See http://www.emacswiki.org/emacs/Icicles_-_Shell-Command_Enhancements.
1494     ;; 
1495     ;; dired-read-shell-command
1496     ;; read-shell-command
1497     ess-complete-object-name
1498     gud-gdb-complete-command
1499     Info-goto-node                       Info-index
1500     Info-menu
1501     lisp-complete-symbol
1502     lisp-completion-at-point             minibuffer-default-add-completions
1503     read-color                           read-from-minibuffer
1504     read-string
1505     recentf-make-menu-items              repeat-complex-command)
1506   "*List of symbols representing functions to be redefined in Icicle mode.
1507 In Icicle mode, each such FUNCTION is aliased to Icicles function
1508 `icicle-FUNCTION'.  The original functions are restored when you exit
1509 Icicle mode, by aliasing each FUNCTION to `old-FUNCTION'.
1510
1511 Aliasing takes place only if `old-FUNCTION' is defined.  Icicles
1512 predefines each `old-FUNCTION' found in the default value, as well as
1513 each corresponding `icicle-FUNCTION' .  If you add additional
1514 functions of your own choosing, then you will also need to define
1515 `old-FUNCTION' and `icicle-FUNCTION' accordingly - see the Icicles
1516 code for examples.
1517
1518 If you customize this option, then you must exit and re-enter Icicle
1519 mode to ensure that the change takes effect.
1520
1521 For this option to have an effect upon startup, it must be set before
1522 you enter Icicle mode.  This means that you must ensure that the code
1523 that sets it is invoked before you enter Icicle mode.  If you use
1524 Customize to change this option, then ensure that the code inserted by
1525 Customize into your `user-init-file' or your `custom-file' is invoked
1526 before you enter Icicle mode."
1527   :type '(repeat (restricted-sexp :tag "Command"
1528                   ;; Use `symbolp' instead of `functionp' or `fboundp', in case the library
1529                   ;; defining the function is not loaded.
1530                   :match-alternatives (symbolp) :value ignore))
1531   :set #'(lambda (sym defs)
1532            (custom-set-default sym defs)
1533            (when (boundp 'icicle-mode-map) ; Avoid error on initialization.
1534              (icicle-redefine-standard-functions)))
1535   :initialize #'custom-initialize-default
1536   :group 'Icicles-Miscellaneous)
1537
1538 ;;;###autoload
1539 (defcustom icicle-guess-commands-in-path nil
1540   "*Non-nil means all shell commands are available for completion.
1541 This is used in Icicle mode whenever a shell-command is read.
1542
1543 If non-nil, then all executable files (or all files, if option
1544 `shell-completion-execonly' is nil) in your search path are included
1545 among the completion candidates, in addition to any commands that are
1546 guessed as being appropriate for the target files (e.g. marked files
1547 in Dired).
1548
1549 If non-nil and if option `icicle-shell-command-candidates-cache' is
1550 nil, then the list of commands is computed once and cached as the
1551 value of `icicle-shell-command-candidates-cache'.  The particular
1552 non-nil value of `icicle-guess-commands-in-path' determines when the
1553 cache is filled, as follows:
1554
1555 - If the value is `load', then the cache is filled when Icicles is
1556   first loaded, and it is saved persistently.
1557
1558 - If the value is `first-use', then the cache is filled when you first
1559   complete a shell command, and the computed list is not saved
1560   persistently.
1561
1562 If the value is not `load', then whenever you enter Icicle mode the
1563 cache is emptied.
1564
1565 If your environment changes and you want to update the cached list,
1566 you can use command `icicle-recompute-shell-command-candidates'.  With
1567 a prefix argument, that command also saves the cache persistently."
1568   :type '(choice
1569           (const :tag "Do not add shell commands from search path"              nil)
1570           (const :tag "Compute shell commands from path when Icicles is loaded" load)
1571           (const :tag "Compute shell commands from path upon first use"         first-use))
1572   :group 'Icicles-Miscellaneous)
1573
1574 ;;;###autoload
1575 (defcustom icicle-help-in-mode-line-delay 5
1576   "*Seconds to show help in the mode-line for individual completions.
1577 If buffer `*Completions*' is displayed, then use its mode-line.
1578 Otherwise, use the mode-line of the current buffer.
1579
1580 The help is shown when you cycle among completion candidates and when
1581 your input is completed (entirely) to a candidate.
1582
1583 Face `icicle-mode-line-help' is used for the help.
1584
1585 A value of zero means do not show such help at all.  In any case, a
1586 user event (e.g. a key press) always interrupts this display.
1587
1588 Note that `post-command-hook' actions do not take place until this
1589 display is finished."
1590   :type 'number :group 'Icicles-Completions-Display :group 'Icicles-Miscellaneous)
1591
1592 ;;;###autoload
1593 (defcustom icicle-hide-common-match-in-Completions-flag nil
1594   "*Non-nil means hide the common match for your input, in `*Completions*'.
1595 You can toggle this option during completion using `C-x .' (no prefix
1596 arg).  See also option `icicle-hide-non-matching-lines-flag'.
1597
1598 The common match used here is governed by option
1599 `icicle-expand-input-to-common-match-flag'.  It is elided using
1600 ellipsis (`...')."
1601   :type 'boolean :group 'Icicles-Miscellaneous)
1602
1603 ;;;###autoload
1604 (defcustom icicle-hide-non-matching-lines-flag nil
1605   "*Non-nil means hide search candidate lines that do not match input.
1606 This applies only to multi-line candidates in buffer `*Completions*'.
1607 Lines that do not contain text matched by your current
1608 minibuffer input are elided using ellipsis (`...').
1609 You can toggle this option during completion using `C-u C-x .'.
1610
1611 See also option `icicle-hide-common-match-in-Completions-flag'."
1612   :type 'boolean :group 'Icicles-Completions-Display)
1613
1614 ;;;###autoload
1615 (defcustom icicle-highlight-historical-candidates-flag t ; Toggle with `C-pause'.
1616   "*Non-nil means highlight `*Completions*' candidates that have been used.
1617 This is done using face `icicle-historical-candidate'.
1618 Historical candidates are those that you have entered (using `RET' or
1619 `S-RET') previously.  You can toggle this option from the minibuffer
1620 at any time using `C-pause'."
1621   :type 'boolean :group 'Icicles-Completions-Display)
1622
1623 ;;;###autoload
1624 (defcustom icicle-highlight-input-completion-failure 'implicit-strict
1625   "*Non-nil means highlight the part of your input that does not complete.
1626 This is done using face `icicle-input-completion-fail' or
1627 `icicle-input-completion-fail-lax'.
1628
1629 You can use `\\<minibuffer-local-completion-map>\\[icicle-goto/kill-failed-input]' \
1630 to go to the start of the highlighted part.
1631 Repeat to kill it.
1632
1633 This highlighting can have a negative impact on performance, because
1634 it can mean recomputing completion candidates multiple times, in order
1635 to determine the longest part that completes.  For this reason, you
1636 can fine tune when you want this highlighting to occur.  The values of
1637 this option and options
1638 `icicle-highlight-input-completion-failure-delay' and
1639 `icicle-highlight-input-completion-failure-threshold' determine when
1640 the highlighting can take place.
1641
1642 In particular, highlighting the non-matching part of remote file names
1643 can be slow.  Two values of this option allow remote file name
1644 highlighting: `always' and `explicit-remote'.  The other values do not
1645 highlight remote file names.  You probably do not want to use a value
1646 of `always'.
1647
1648 If the value is nil, then highlighting never occurs.  If the value is
1649 `explicit-strict', `explicit', or `explicit-remote', then highlighting
1650 occurs only upon demand: when you hit `TAB' or `S-TAB' to request
1651 completion.  If the value is `implicit-strict', `implicit', or
1652 `always', then highlighting occurs also when you update your input
1653 during incremental completion.
1654
1655 If the value is `implicit-strict' or `implicit', then highlighting
1656 occurs not only upon demand but also during incremental completion if
1657 `icicle-incremental-completion-flag' is non-nil.  Remember that you
1658 can toggle incremental completion, using `C-#' in the minibuffer.
1659
1660 I use a value of `implicit' myself, but the default value is
1661 `implicit-strict' because, depending on your setup and use cases,
1662 `implicit' can impact performance for file-name completion (which is
1663 lax, not strict).  I suggest you try `implicit' to see - this feature
1664 is especially useful for file names.
1665
1666 Summary of choices for when to highlight:
1667
1668 nil               Never
1669 `explicit-strict' When you hit `TAB'/`S-TAB' for strict completion
1670 `explicit'        When you hit `TAB'/`S-TAB'
1671 `explicit-remote' When you hit `TAB'/`S-TAB', including remote files
1672 `implicit-strict' During strict completion
1673 `implicit'        During lax or strict completion
1674 `always'          Always, even for names of remote files
1675
1676 After highlighting, you can use `C-M-l' to move the cursor to the
1677 start of the mismatch, for editing there.  You can use a second
1678 `C-M-l' to kill (delete) the mismatch up to the next input line (if
1679 any).  You can repeat `C-M-l' to kill additional input lines.
1680
1681 See also:
1682 * `icicle-highlight-input-completion-failure-delay'
1683 * `icicle-highlight-input-completion-failure-threshold'"
1684   :type '(choice
1685           (const :tag "Never"                                               nil)
1686           (const :tag "Explicit (`TAB'/`S-TAB') strict completion"          explicit-strict)
1687           (const :tag "Explicit (`TAB'/`S-TAB') lax and strict completion"  explicit)
1688           (const :tag "Explicit completion, even of remote file names"      explicit-remote)
1689           (const :tag "Strict completion"                                   implicit-strict)
1690           (const :tag "Lax and strict completion"                           implicit)
1691           (const :tag "Always (including for remote file names)"            always))
1692   :group 'Icicles-Minibuffer-Display)
1693
1694 ;;;###autoload
1695 (defcustom icicle-highlight-input-completion-failure-delay 0.7
1696   "*Seconds to wait before highlighting non-completing part of your input.
1697 Zero means there is no wait."
1698   :type 'number :group 'Icicles-Minibuffer-Display)
1699
1700 ;;;###autoload
1701 (defcustom icicle-highlight-input-completion-failure-threshold 1000
1702   "*More candidates means do not highlight non-completing part of input.
1703 See also `icicle-highlight-input-completion-failure'."
1704   :type 'integer :group 'Icicles-Minibuffer-Display)
1705
1706 ;;;###autoload
1707 (defcustom icicle-highlight-input-initial-whitespace-flag t
1708   "*Non-nil means highlight initial whitespace in your input.
1709 This is done using face `icicle-whitespace-highlight'.
1710 Purpose: Otherwise, you might not notice that you accidentally typed
1711 some whitespace at the beginning of your input, so you might not
1712 understand the set of matching candidates (or lack thereof).
1713
1714 Note: Highlighting input completion failure (see option
1715 `icicle-highlight-input-completion-failure') subsumes
1716 initial-whitespace highlighting.  This means that if no completion
1717 candidate starts with whitespace, and if Icicles is highlighting input
1718 completion failure, then only that highlighting is shown."
1719   :type 'boolean :group 'Icicles-Minibuffer-Display)
1720
1721 ;;;###autoload
1722 (defcustom icicle-highlight-lighter-flag t
1723   "*Non-nil means highlight the `Icy' mode-line lighter during completion.
1724 See the Icicles doc, section `Nutshell View of Icicles', subsection
1725 `Completion Status Indicators' for more information."
1726   :type 'boolean :group 'Icicles-Miscellaneous)
1727
1728 ;;;###autoload
1729 (defcustom icicle-highlight-saved-candidates-flag t ; Toggle with `S-pause'.
1730   "*Non-nil means highlight `*Completions*' candidates that have been saved.
1731 This is done using face `icicle-saved-candidate'.
1732 You save candidates using, for example, `C-M->'.  You can toggle this
1733 option from the minibuffer at any time using `S-pause'."
1734   :type 'boolean :group 'Icicles-Completions-Display)
1735
1736 ;;;###autoload
1737 (defcustom icicle-ignore-comments-flag t
1738   "Non-nil means `icicle-with-comments-hidden' hides comments.
1739 You can toggle this option using `C-M-;' in the minibuffer, but to see
1740 the effect you might need to invoke the current command again."
1741   :type 'boolean :group 'Icicles-Searching)
1742
1743 ;;;###autoload
1744 (defcustom icicle-ignored-directories (and (boundp 'vc-directory-exclusion-list)
1745                                            vc-directory-exclusion-list)
1746   "*Directories ignored by `icicle-locate-file'."
1747   :type '(repeat string) :group 'Icicles-Files)
1748
1749 ;;;###autoload
1750 (defcustom icicle-ignore-space-prefix-flag nil ; Toggle with `M-_'.
1751   "*Non-nil means ignore completion candidates that start with a space.
1752 However, such candidates are not ignored for prefix completion when
1753 the input also starts with a space.  You can toggle this option from
1754 the minibuffer using `M-_'.
1755 Note: Some Icicles functionalities ignore the value of this option."
1756   :type 'boolean :group 'Icicles-Matching)
1757
1758 ;;;###autoload
1759 (defcustom icicle-image-files-in-Completions (and (fboundp 'image-file-name-regexp)
1760                                                   (if (fboundp 'display-graphic-p)
1761                                                       (display-graphic-p)
1762                                                     window-system)
1763                                                   t)
1764   "*Non-nil means show thumbnail images for image files in `*Completions*'.
1765 This has no effect if your Emacs version does not have image support.
1766
1767  `nil'   means show only file names.
1768  `image' means show only thumbnail images.
1769  `t'     means show both file names and thumbnail images.
1770
1771 You can cycle the value during completion using `C-x t'."
1772   :type '(choice
1773           (const :tag "Both name and thumbnail"  t)
1774           (const :tag "Thumbnail image only"     'image-only)
1775           (const :tag "File name only"           nil))
1776   :group 'Icicles-Completions-Display)
1777
1778 ;;;###autoload
1779 (defcustom icicle-incremental-completion-delay 0.7
1780   "*Number of seconds to wait before updating `*Completions*' incrementally.
1781 There is no wait if the number of completion candidates is less than
1782 or equal to `icicle-incremental-completion-threshold'.
1783 See also `icicle-incremental-completion-flag'."
1784   :type 'number :group 'Icicles-Completions-Display)
1785
1786 ;;;###autoload
1787 (defcustom icicle-incremental-completion-flag t ; Toggle with `C-#'.
1788   "*Non-nil means update `*Completions*' buffer incrementally, as you type.
1789 nil means do not update `*Completions*' incrementally, as you type.
1790 t means do nothing if `*Completions*' is not already displayed.
1791 Non-nil and non-t means display `*Completions*' and update it.
1792 You can toggle this between t and nil from the minibuffer at any time
1793 using `C-#'.
1794
1795 Note: Incremental completion is effectively turned off when a remote
1796 file name is read, that is, whenever your file-name input matches a
1797 remote-file syntax.
1798
1799 See also `icicle-incremental-completion-delay' and
1800 `icicle-incremental-completion-threshold'."
1801   :type '(choice
1802           (const :tag "Do not update `*Completions*' incrementally"                nil)
1803           (const :tag "Update `*Completions*' incrementally if already displayed"  t)
1804           (other :tag "Update `*Completions*' incrementally always"                always))
1805   :group 'Icicles-Completions-Display)
1806
1807 ;;;###autoload
1808 (defcustom icicle-incremental-completion-threshold 1000
1809   "*More candidates means apply `icicle-incremental-completion-delay'.
1810 See also `icicle-incremental-completion-flag' and
1811 `icicle-incremental-completion-delay'.
1812 This threshold is also used to decide when to display the message
1813  \"Displaying completion candidates...\"."
1814   :type 'integer :group 'Icicles-Completions-Display)
1815
1816 ;;;###autoload
1817 (defcustom icicle-inhibit-advice-functions
1818   '(choose-completion choose-completion-string completing-read
1819     completion-setup-function dired-smart-shell-command
1820     display-completion-list exit-minibuffer face-valid-attribute-values
1821     minibuffer-complete-and-exit mouse-choose-completion
1822     next-history-element read-face-name read-file-name read-number
1823     shell-command shell-command-on-region switch-to-completions
1824     completing-read-multiple)
1825   "*Functions that Icicles redefines, and for which advice is deactivated.
1826 Icicle mode deactivates all advice for such functions.  The advice is
1827 reactivated when you leave Icicle mode."
1828   :type '(repeat (function :tag "Function for which Icicles deactivates advice"))
1829   :group 'Icicles-Miscellaneous)
1830
1831 ;;;###autoload
1832 (defcustom icicle-inhibit-ding-flag nil
1833   "*Non-nil means Icicles never uses an audible bell (ding).
1834 If nil, Icicles sometimes signals you with a sound."
1835   :type 'boolean :group 'Icicles-Miscellaneous)
1836
1837 ;;;###autoload
1838 (defcustom icicle-input-string ".*"
1839   "*String to insert in minibuffer via `\\<minibuffer-local-completion-map>\
1840 \\[icicle-insert-string-from-variable]'.
1841 Typically, this is a regexp or a portion of a regexp."
1842   :type 'string :group 'Icicles-Miscellaneous)
1843
1844 (when (fboundp 'defvaralias)            ; Emacs 22+
1845   (defvaralias 'icicle-key-descriptions-use-angle-brackets-flag
1846       'icicle-key-descriptions-use-<>-flag))
1847
1848 ;;;###autoload
1849 (defcustom icicle-inter-candidates-min-spaces 1
1850   "*Min number of spaces between candidates displayed in `*Completions*'.
1851 If you use Do Re Mi (library `doremi.el'), then you can modify this
1852 option incrementally during completion, seeing the effect as it
1853 changes.  Use `\\<minibuffer-local-completion-map>\
1854 \\[icicle-doremi-inter-candidates-min-spaces+]' from the minibuffer, then use the `up' and
1855 `down' arrow keys or the mouse wheel to increment and decrement the
1856 value.  WYSIWYG.
1857
1858 See also option `icicle-candidate-width-factor' and (starting with
1859 Emacs 23) option `icicle-Completions-text-scale-decrease'."
1860   :type 'integer :group 'Icicles-Completions-Display)
1861
1862 ;;;###autoload
1863 (defcustom icicle-isearch-complete-keys '([C-M-tab] ; `M-TAB', `C-M-TAB'
1864                                           [M-tab] "\M-\t" [escape tab] ; Replace vanilla. 
1865                                           "\M-o") ; Like Icicles minibuffer `M-o'.
1866   "*Key sequences to use for `icicle-isearch-complete'.
1867 A list of values that each has the same form as a key-sequence
1868 argument to `define-key'.
1869
1870 The default value includes `M-TAB', which replaces the vanilla binding
1871 of `isearch-complete'.
1872
1873 It also includes `ESC TAB' and `C-M-TAB', because some operating
1874 systems intercept `M-TAB' for their own use.  (Note: For MS Windows,
1875 you can use (w32-register-hot-key [M-tab]) to allow Emacs to use
1876 `M-TAB'.)
1877
1878 It also includes `M-o', in keeping with the Icicles use of `M-o'
1879 during minibuffer completion."
1880   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
1881
1882 ;;;###autoload
1883 (defcustom icicle-key-complete-keys '([S-tab] [S-iso-lefttab]) ; `S-TAB'
1884   ;; $$$$$ The following should be sufficient, but some Emacs 22+ libraries, such as `info.el',
1885   ;; are brain-dead and explicitly bind both `backtab' and `S-tab'.  I filed Emacs bug #1281.
1886   ;;   (if (> emacs-major-version 21)
1887   ;;       '([backtab])
1888   ;;     '([S-tab] [S-iso-lefttab]))
1889   "*Key sequences to use for `icicle-complete-key'.
1890 A list of values that each has the same form as a key-sequence
1891 argument to `define-key'.  It is a list mainly in order to accommodate
1892 different keyboards - for example, `S-tab' and `S-iso-lefttab'."
1893 ;; In Emacs 22 and later, `backtab' is the canonical key that represents
1894 ;; both `S-tab' and `S-iso-lefttab', so that is used in the default
1895 ;; value.  If, for some reason, `backtab' is not being translated to
1896 ;; `S-tab' and `S-iso-lefttab' on your platform, you might want to
1897 ;; customize the value to ([S-tab] [S-iso-lefttab]).  And if your Emacs
1898 ;; version is 22 or later, please file an Emacs bug about the lack of
1899 ;; translation.
1900   :type '(repeat sexp) :group 'Icicles-Key-Completion :group 'Icicles-Key-Bindings)
1901
1902 ;;;###autoload
1903 (defcustom icicle-key-descriptions-use-<>-flag nil
1904   "*Non-nil means Icicles key descriptions should use angle brackets (<>).
1905 For example, non-nil gives `<mode-line>'; nil gives `mode-line'.
1906
1907 This does not affect Emacs key descriptions outside of
1908 Icicles (e.g. `C-h k' or `C-h w').
1909
1910 This has no effect for versions of Emacs prior to 21, because
1911 they never use angle brackets."
1912   :type 'boolean :group 'Icicles-Key-Completion :group 'Icicles-Minibuffer-Display)
1913
1914 ;;;###autoload
1915 (defcustom icicle-keymaps-for-key-completion
1916   '(bookmark-bmenu-mode-map bmkp-jump-map bmkp-jump-other-window-map
1917     calendar-mode-map dired-mode-map facemenu-keymap jde-mode-map jde-jdb-mode-map
1918     senator-mode-map srecode-mode-map synonyms-mode-map vc-dired-mode-map)
1919   "*List of keymaps in which to bind `S-TAB' to `icicle-complete-keys'.
1920 List elements are symbols that are bound to keymaps.
1921
1922 Each keymap should have at least one prefix key.  `S-TAB' is bound in
1923 each keymap, so that you can use it to complete the prefix keys.
1924
1925 If one of the keymaps is not defined when Icicle mode is entered, then
1926 it is ignored.  If you later define it, then just exit and reenter
1927 Icicle mode, to bind `S-TAB' in the newly defined map.  For example,
1928 use `M-x icy-mode' twice after entering Calendar mode, to be able to
1929 complete `calendar-mode' prefix keys such as `A'.
1930
1931 Do not add `global-map' or any keymaps, such as `ctl-x-map', that are
1932 accessible from the global keymap to the list - they are already
1933 treated, by default.
1934
1935 Do not add any of the translation keymaps, `function-key-map',
1936 `key-translation-map', or `iso-transl-ctl-x-8-map' to the list - that
1937 will not work."
1938   :type '(repeat symbol) :group 'Icicles-Key-Completion :group 'Icicles-Key-Bindings)
1939
1940 (when (boundp 'kmacro-ring)             ; Emacs 22+
1941   (defcustom icicle-kmacro-ring-max (if (boundp 'most-positive-fixnum)
1942                                         most-positive-fixnum
1943                                       67108863) ; 1/2 of `most-positive-fixnum' on Windows.
1944     "*Icicles version of `kmacro-ring-max'."
1945     :type 'integer :group 'Icicles-Miscellaneous))
1946
1947 ;;;###autoload
1948 (defcustom icicle-levenshtein-distance 1
1949   "*Levenshtein distance allowed for strings to be considered as matching.
1950 Icicles matching function `icicle-levenshtein-match' considers a
1951 string to match another if the first string is within this distance of
1952 some substring of the second.
1953 This option is used only if you have library `levenshtein.el'."
1954   :type 'integer :group 'Icicles-Matching)
1955
1956 ;;; $$$$$$
1957 ;;; (defcustom icicle-list-end-string "
1958
1959 ;;; "
1960 ;;;   "*String appended to a completion candidate that is a list of strings.
1961 ;;; When a completion candidate is a list of strings, they are joined
1962 ;;; pairwise using `icicle-list-join-string', and `icicle-list-end-string'
1963 ;;; is appended to the joined strings.  The result is what is displayed as
1964 ;;; a completion candidate in buffer `*Completions*', and that is what is
1965 ;;; matched by your minibuffer input.
1966
1967 ;;; The purpose of `icicle-list-end-string' is to allow some separation
1968 ;;; between the displayed completion candidates.  Candidates that are
1969 ;;; provided to input-reading functions such as `completing-read' as lists
1970 ;;; of strings are often displayed using multiple lines of text.  If
1971 ;;; `icicle-list-end-string' is \"\", then the candidates appear run
1972 ;;; together, with no visual separation.
1973
1974 ;;; It is important to remember that `icicle-list-end-string' is part of
1975 ;;; each completion candidate in such circumstances.  This matters if you
1976 ;;; use a regexp that ends in `$', matching the end of the candidate."
1977 ;;;   :type 'string :group 'Icicles-Completions-Display)
1978
1979 ;; Note: If your copy of this file does not have the two-character string "^G^J"
1980 ;; (Control-G, Control-J) or, equivalently, \007\012, as the default value, you will want
1981 ;; to change the file to have that.  To insert these control characters in the file, use
1982 ;; `C-q'.  Emacs Wiki loses the ^G from the file, so I use \007, which works OK.
1983 ;;
1984 ;;;###autoload
1985 (defcustom icicle-list-join-string (let ((strg  (copy-sequence "\007\012")))
1986                                      ;; Emacs 20 ignores `display', so don't bother.
1987                                      ;; Emacs 21 has a big bug, which interprets `display' badly.
1988                                      (when (> emacs-major-version 21) ; Avoid Emacs 21 bug.
1989                                        (set-text-properties 0 1 '(display "") strg))
1990                                      strg)
1991   "*String joining items in a completion that is a list of strings.
1992 When a completion candidate is a list of strings, this string is used
1993 to join the strings in the list, for display and matching purposes.
1994 When completing input, you type regexps that match the strings,
1995 separating them pairwise by the value of `icicle-list-join-string'.
1996 Actually, what you enter is interpreted as a single regexp to be
1997 matched against the joined strings.  Typically, the candidate list
1998 contains two strings: a name and its doc string.
1999
2000 A good value for this option is a string that:
2001  1) does not normally occur in doc strings,
2002  2) visually separates the two strings it joins, and
2003  3) is not too difficult or too long to type.
2004
2005 The default value is \"^G\^J\", that is, control-g followed by
2006 control-j (newline):
2007  1) ^G does not normally occur in doc strings
2008  2) a newline visually separates the multiple component strings, which
2009     helps readability in buffer `*Completions*'
2010  3) you can type the value using `C-q C-g C-q C-j'.
2011
2012 For readability (in Emacs 22 and later), the default value has a
2013 `display' property that makes it appear as simply a newline in
2014 `*Completions*' - the `^G' is hidden.  you can also make the default
2015 value appear this way in your minibuffer input also, by using \
2016 `\\<minibuffer-local-completion-map>\\[icicle-insert-list-join-string].'
2017
2018 If you like the default value of `^G^J', but you prefer that the `^G'
2019 not be hidden, then just customize this option.  In Customize, use
2020 `Show initial Lisp expression' after clicking the `State' button, to
2021 be able to edit the default value.  Remove the `set-text-properties'
2022 expression, which sets text property `display' to \"\"."
2023   :type 'string :group 'Icicles-Completions-Display)
2024
2025 ;;;###autoload
2026 (defcustom icicle-list-nth-parts-join-string " "
2027   "*String joining candidate parts split by `icicle-list-use-nth-parts'.
2028 This has an effect on multi-completion candidates only, and only if
2029 the current command uses `icicle-list-use-nth-parts'."
2030   :type 'string :group 'Icicles-Completions-Display)
2031
2032 ;;;###autoload
2033 (defcustom icicle-max-candidates nil
2034   "*Non-nil means truncate completion candidates to at most this many.
2035 If you use library `doremi.el' then you can use `C-x #' during
2036 completion to increment or decrement the option value using the
2037 vertical arrow keys or the mouse wheel.  A numeric prefix argument for
2038 `C-x #' sets the increment size.  A plain prefix argument (`C-u')
2039 resets `icicle-max-candidates' to nil, meaning no truncation."
2040   :type '(choice (const :tag "None" nil) integer)
2041   :group 'Icicles-Completions-Display :group 'Icicles-Matching
2042   :group 'Icicles-Buffers :group 'Icicles-Files)
2043
2044 ;;;###autoload
2045 (defcustom icicle-menu-items-to-history-flag t
2046   "*Non-nil means to add menu-item commands to the command history.
2047 This history is `extended-command-history'.
2048
2049 After you change the value of this option, toggle Icicle mode off,
2050 then on again, for the change to take effect in the same session."
2051   :type 'boolean :group 'Icicles-Miscellaneous)
2052
2053 ;; Inspired from `icomplete-minibuffer-setup-hook'.
2054 ;;;###autoload
2055 (defcustom icicle-minibuffer-setup-hook nil
2056   "*Functions run at the end of minibuffer setup for Icicle mode."
2057   :type 'hook :group 'Icicles-Miscellaneous)
2058
2059 ;;;###autoload
2060 (defcustom icicle-modal-cycle-down-keys ; `down', `wheel-down'
2061   (if (boundp 'mouse-wheel-down-event)  ; Emacs 22+
2062       (list
2063        [down]
2064        (vector nil mouse-wheel-up-event)
2065        (vector mouse-wheel-up-event))
2066     '([down]))
2067   "*Key sequences to use for modal cycling to the next candidate.
2068 A list of values that each has the same form as a key-sequence
2069 argument to `define-key'.  It is a list mainly in order to accommodate
2070 different keyboards.
2071
2072 Option `icicle-use-C-for-actions-flag' swaps these keys with
2073 `icicle-modal-cycle-down-action-keys'."
2074   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2075
2076 ;;;###autoload
2077 (defcustom icicle-modal-cycle-down-action-keys ; `C-down', `C-wheel-down'
2078   (if (boundp 'mouse-wheel-up-event)    ; Emacs 22+
2079       (list
2080        [C-down]
2081        (vector nil (list 'control
2082                          mouse-wheel-up-event))
2083        (vector (list 'control
2084                      mouse-wheel-up-event)))
2085     '([C-down]))
2086   "*Keys for modal completion to cycle next and perform action.
2087 A list of values that each has the same form as a key-sequence
2088 argument to `define-key'.  It is a list mainly in order to accommodate
2089 different keyboards.
2090
2091 Option `icicle-use-C-for-actions-flag' swaps these keys with
2092 `icicle-modal-cycle-down-keys'."
2093   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2094
2095 ;;;###autoload
2096 (defcustom icicle-modal-cycle-down-alt-action-keys ; `C-S-down', `C-S-wheel-down'
2097   (if (boundp 'mouse-wheel-up-event)    ;Emacs22+
2098       (list
2099        [C-S-down]
2100        (vector nil (list 'control 'shift
2101                          mouse-wheel-up-event))
2102        (vector (list 'control 'shift
2103                      mouse-wheel-up-event)))
2104     '([C-S-down]))
2105   "*Keys for modal completion to cycle next and perform alt action.
2106 A list of values that each has the same form as a key-sequence
2107 argument to `define-key'.  It is a list mainly in order to accommodate
2108 different keyboards."
2109   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2110
2111 ;;;###autoload
2112 (defcustom icicle-modal-cycle-down-help-keys ; `C-M-down', `C-M-wheel-down'
2113   (if (boundp 'mouse-wheel-up-event)    ; Emacs 22+
2114       (list
2115        [(control meta down)]
2116        (vector nil (list 'control 'meta
2117                          mouse-wheel-up-event))
2118        (vector (list 'control 'meta
2119                      mouse-wheel-up-event)))
2120     '([(control meta down)]))
2121   "*Keys for modal completion to cycle next and show candidate help.
2122 A list of values that each has the same form as a key-sequence
2123 argument to `define-key'.  It is a list mainly in order to accommodate
2124 different keyboards."
2125   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2126
2127 ;;;###autoload
2128 (defcustom icicle-modal-cycle-up-keys   ; `up', `wheel-up'
2129   (if (boundp 'mouse-wheel-down-event)  ; Emacs 22+
2130       (list
2131        [up]
2132        (vector nil mouse-wheel-down-event)
2133        (vector mouse-wheel-down-event))
2134     '([up]))
2135   "*Key sequences to use for modal cycling to the previous candidate.
2136 A list of values that each has the same form as a key-sequence
2137 argument to `define-key'.  It is a list mainly in order to accommodate
2138 different keyboards.
2139
2140 Option `icicle-use-C-for-actions-flag' swaps these keys with
2141 `icicle-modal-cycle-up-action-keys'."
2142   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2143
2144 ;;;###autoload
2145 (defcustom icicle-modal-cycle-up-action-keys ; `C-up', `C-wheel-up'
2146   (if (boundp 'mouse-wheel-down-event)  ; Emacs 22+
2147       (list
2148        [C-up]
2149        (vector nil (list 'control
2150                          mouse-wheel-down-event))
2151        (vector (list 'control
2152                      mouse-wheel-down-event)))
2153     '([C-up]))
2154   "*Keys for modal completion to cycle previous and perform action.
2155 A list of values that each has the same form as a key-sequence
2156 argument to `define-key'.  It is a list mainly in order to accommodate
2157 different keyboards.
2158
2159 Option `icicle-use-C-for-actions-flag' swaps these keys with
2160 `icicle-modal-cycle-up-keys'."
2161   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2162
2163 ;;;###autoload
2164 (defcustom icicle-modal-cycle-up-alt-action-keys ; `C-S-up', `C-S-wheel-up'
2165   (if (boundp 'mouse-wheel-down-event)  ; Emacs 22+
2166       (list
2167        [C-S-up]
2168        (vector nil (list 'control 'shift
2169                          mouse-wheel-down-event))
2170        (vector (list 'control 'shift
2171                      mouse-wheel-down-event)))
2172     '([C-S-up]))
2173   "*Keys for modal completion to cycle previous and perform alt action.
2174 A list of values that each has the same form as a key-sequence
2175 argument to `define-key'.  It is a list mainly in order to accommodate
2176 different keyboards."
2177   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2178
2179 ;;;###autoload
2180 (defcustom icicle-modal-cycle-up-help-keys ; `C-M-up', `C-M-wheel-up'
2181   (if (boundp 'mouse-wheel-down-event)  ; Emacs 22+
2182       (list
2183        [(control meta up)]
2184        (vector nil (list 'control 'meta
2185                          mouse-wheel-down-event))
2186        (vector (list 'control 'meta
2187                      mouse-wheel-down-event)))
2188     '([(control meta up)]))
2189   "*Keys for modal completion to cycle previous and show candidate help.
2190 A list of values that each has the same form as a key-sequence
2191 argument to `define-key'.  It is a list mainly in order to accommodate
2192 different keyboards."
2193   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2194
2195 ;;;###autoload
2196 (defcustom icicle-no-match-hook nil
2197   "*List of hook functions run during completion when there are no matches."
2198   :type 'hook :group 'Icicles-Miscellaneous)
2199
2200 ;;;###autoload
2201 (defcustom icicle-option-type-prefix-arg-list '(direct inherit inherit-or-value direct-or-value
2202                                                 inherit-or-regexp direct-or-regexp)
2203   "*Symbols controlling prefix args for `icicle-describe-option-of-type'.
2204 A list of six symbols taken from this list:
2205
2206   direct            inherit             inherit-or-value
2207   direct-or-value   inherit-or-regexp   direct-or-regexp
2208
2209 Choose the order you like.  The list members map, in order left to
2210 right, to these prefix argument keys:
2211
2212  `C-u C-u'           `C-0'            `C-u'
2213  `C-9' (positive)    no prefix arg    `C--' (negative)
2214
2215 For the meanings of the symbols, see the doc string of
2216 `icicle-describe-option-of-type', which describes the default
2217 prefix-argument bindings for the command."
2218   :type '(list symbol symbol symbol symbol symbol symbol) :group 'Icicles-Key-Bindings)
2219
2220 (when (> emacs-major-version 22)
2221   (defcustom icicle-populate-interactive-history-flag nil
2222     "*Non-nil means populate `icicle-interactive-history'.
2223 That means add commands invoked interactively to that history, for use
2224 during completion by `C-M-pause'.
2225
2226 After you change the value of this option, toggle Icicle mode off,
2227 then on again, for the change to take effect in the same session.
2228
2229 Be aware that this history can become quite long.
2230
2231 Furthermore, there is an Emacs bug (#3984) that causes interactiveness
2232 tests (`interactive-p' and `called-interactively-p') to fail, whenever
2233 `call-interactively' is advised (which is how Icicles implements this
2234 feature)."
2235     :type 'boolean :group 'Icicles-Miscellaneous))
2236
2237 ;;;###autoload
2238 (defcustom icicle-pp-eval-expression-print-length nil
2239   "*Value for `print-length' while printing value in `pp-eval-expression'.
2240 A value of nil means no limit."
2241   :type '(choice (const :tag "No Limit" nil) integer) :group 'Icicles-Miscellaneous)
2242
2243 ;;;###autoload
2244 (defcustom icicle-pp-eval-expression-print-level nil
2245   "*Value for `print-level' while printing value in `pp-eval-expression'.
2246 A value of nil means no limit."
2247   :type '(choice (const :tag "No Limit" nil) integer) :group 'Icicles-Miscellaneous)
2248
2249 ;;;###autoload
2250 (defcustom icicle-prefix-complete-keys '([tab] [(control ?i)]) ; `C-i' is `TAB'.
2251   "*Key sequences to use for `icicle-prefix-complete'.
2252 A list of values that each has the same form as a key-sequence
2253 argument to `define-key'.  It is a list mainly in order to accommodate
2254 different keyboards."
2255   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2256
2257 ;;;###autoload
2258 (defcustom icicle-prefix-complete-no-display-keys '([(control meta tab)]) ; `C-M-TAB'
2259   "*Key sequences to use for `icicle-prefix-complete-no-display'.
2260 A list of values that each has the same form as a key-sequence
2261 argument to `define-key'.  It is a list mainly in order to accommodate
2262 different keyboards."
2263   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2264
2265 ;;;###autoload
2266 (defcustom icicle-prefix-cycle-next-keys '([end]) ; `end'
2267   "*Key sequences for prefix completion to cycle to the next candidate.
2268 A list of values that each has the same form as a key-sequence
2269 argument to `define-key'.  It is a list mainly in order to accommodate
2270 different keyboards.
2271
2272 Option `icicle-use-C-for-actions-flag' swaps these keys with
2273 `icicle-prefix-cycle-next-action-keys'."
2274   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2275
2276 ;;;###autoload
2277 (defcustom icicle-prefix-cycle-next-action-keys '([C-end]) ; `C-end'
2278   "*Keys for prefix completion to cycle next and perform action.
2279 A list of values that each has the same form as a key-sequence
2280 argument to `define-key'.  It is a list mainly in order to accommodate
2281 different keyboards.
2282
2283 Option `icicle-use-C-for-actions-flag' swaps these keys with
2284 `icicle-prefix-cycle-next-keys'."
2285   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2286
2287 ;;;###autoload
2288 (defcustom icicle-prefix-cycle-next-alt-action-keys '([C-S-end]) ; `C-S-end'
2289   "*Keys for prefix completion to cycle next and perform alt action.
2290 A list of values that each has the same form as a key-sequence
2291 argument to `define-key'.  It is a list mainly in order to accommodate
2292 different keyboards."
2293   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2294
2295 ;;;###autoload
2296 (defcustom icicle-prefix-cycle-next-help-keys '([(control meta end)]) ; `C-M-end'
2297   "*Keys for prefix completion to cycle next and show candidate help.
2298 A list of values that each has the same form as a key-sequence
2299 argument to `define-key'.  It is a list mainly in order to accommodate
2300 different keyboards."
2301   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2302
2303 ;;;###autoload
2304 (defcustom icicle-prefix-cycle-previous-keys '([home]) ; `home'
2305   "*Key sequences for prefix completion to cycle to the previous candidate.
2306 A list of values that each has the same form as a key-sequence
2307 argument to `define-key'.  It is a list mainly in order to accommodate
2308 different keyboards.
2309
2310 Option `icicle-use-C-for-actions-flag' swaps these keys with
2311 `icicle-prefix-cycle-previous-action-keys'."
2312   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2313
2314 ;;;###autoload
2315 (defcustom icicle-prefix-cycle-previous-action-keys '([C-home]) ; `C-home'
2316   "*Keys for prefix completion to cycle previous and perform action.
2317 A list of values that each has the same form as a key-sequence
2318 argument to `define-key'.  It is a list mainly in order to accommodate
2319 different keyboards.
2320
2321 Option `icicle-use-C-for-actions-flag' swaps these keys with
2322 `icicle-prefix-cycle-previous-keys'."
2323   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2324
2325 ;;;###autoload
2326 (defcustom icicle-prefix-cycle-previous-alt-action-keys '([C-S-home]) ; `C-S-home'
2327   "*Keys for prefix completion to cycle previous and perform alt action.
2328 A list of values that each has the same form as a key-sequence
2329 argument to `define-key'.  It is a list mainly in order to accommodate
2330 different keyboards."
2331   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2332
2333 ;;;###autoload
2334 (defcustom icicle-prefix-cycle-previous-help-keys '([(control meta home)]) ; `C-M-home'
2335   "*Keys for prefix completion to cycle previous and show candidate help.
2336 A list of values that each has the same form as a key-sequence
2337 argument to `define-key'.  It is a list mainly in order to accommodate
2338 different keyboards."
2339   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2340
2341 ;;;###autoload
2342 (defcustom icicle-previous-candidate-keys '([S-tab] [S-iso-lefttab]) ; `S-TAB'
2343   ;; $$$$$ The following should be sufficient, but some Emacs 22+ libraries, such as `info.el',
2344   ;; are brain-dead and explicitly bind both `backtab' and `S-tab'.  I filed Emacs bug #1281.
2345   ;;   (if (> emacs-major-version 21)
2346   ;;       '([backtab])
2347   ;;     '([S-tab] [S-iso-lefttab]))
2348   "*Key sequences to use for `icicle-move-to-previous-completion'.
2349 In buffer `*Completions*', this moves backward among candidates.
2350
2351 A list of values that each has the same form as a key-sequence
2352 argument to `define-key'.  It is a list mainly in order to accommodate
2353 different keyboards - for example, `S-tab' and `S-iso-lefttab'."
2354 ;; In Emacs 22 and later, `backtab' is the canonical key that represents
2355 ;; both `S-tab' and `S-iso-lefttab', so that is used in the default
2356 ;; value.  If, for some reason, `backtab' is not being translated to
2357 ;; `S-tab' and `S-iso-lefttab' on your platform, you might want to
2358 ;; customize the value to ([S-tab] [S-iso-lefttab]).  And if your Emacs
2359 ;; version is 22 or later, please file an Emacs bug about the lack of
2360 ;; translation.
2361   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2362
2363 ;;;###autoload
2364 (defcustom icicle-quote-shell-file-name-flag t
2365   "*Non-nil means to double-quote the file name that starts a shell command.
2366 This is used by `icicle-read-shell-command-completing'.
2367
2368 If this is nil, then Emacs commands such as `M-!' will not quote a
2369 shell-command file name such as `c:/Program Files/My Dir/mycmd.exe'.
2370 In that case, a shell such as `bash' fails for a shell command such as
2371 `c:/Program Files/My Dir/mycmd.exe arg1 arg2 &', because it interprets
2372 only `c:/Program' as the shell command.  That is, it interprets the
2373 space characters in the file name as separators.  If this is non-nil,
2374 then input such as `c:/Program Files/My Dir/mycmd.exe arg1 arg2 &' is
2375 passed to the shell as
2376 `\"c:/Program Files/My Dir/mycmd.exe\" arg1 arg2 &'.
2377
2378 See the doc string of `icicle-quote-file-name-part-of-cmd' for
2379 information about the characters that, like SPC, lead to quoting."
2380   :type 'boolean :group 'Icicles-Miscellaneous)
2381
2382 ;;;###autoload
2383 (defcustom icicle-read+insert-file-name-keys '([(control meta shift ?f)]) ; `C-M-S-f'
2384   "*Key sequences to invoke `icicle-read+insert-file-name'.
2385 A list of values that each has the same form as a key-sequence
2386 argument to `define-key'.  It is a list mainly in order to accommodate
2387 different keyboards."
2388   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2389
2390 ;;;###autoload
2391 (defcustom icicle-regexp-quote-flag nil ; Toggle with `C-`'.
2392   "*Non-nil means special characters in regexps are escaped.
2393 This means that no characters are recognized as special: they match
2394 themselves.  This turns apropos completion into simple substring
2395 completion.  It also turns Icicles searching into literal searching.
2396 You can toggle this option from the minibuffer at any
2397 time using `C-`'."
2398   :type 'boolean :group 'Icicles-Matching)
2399
2400 ;;;###autoload
2401 (defcustom icicle-regexp-search-ring-max (if (boundp 'most-positive-fixnum)
2402                                              (/ most-positive-fixnum 10)
2403                                            13421772) ; 1/10 of `most-positive-fixnum' on Windows.
2404   "*Icicles version of `regexp-search-ring-max'."
2405   :type 'integer :group 'Icicles-Searching)
2406
2407 ;; You can use `icicle-increment-color-value' in place of `icicle-increment-color-hue', if you
2408 ;; prefer highlighting background to be slightly darker instead of a slightly different hue.
2409 ;;
2410 ;;;###autoload
2411 (defcustom icicle-region-background
2412   (if (featurep 'hexrgb)
2413       (let* ((bg   (or (and (boundp '1on1-active-minibuffer-frame-background)
2414                             1on1-active-minibuffer-frame-background) ; In `oneonone.el'.
2415                        (let ((frame-bg  (cdr (assq 'background-color (frame-parameters)))))
2416                          (when (member frame-bg '(nil unspecified "unspecified-bg"))
2417                            (setq frame-bg  (if (eq (frame-parameter nil 'background-mode) 'dark)
2418                                                "Black"
2419                                              "White")))
2420                          (and frame-bg (x-color-defined-p frame-bg) frame-bg))
2421                        (face-background 'region)))
2422              (sat  (condition-case nil (hexrgb-saturation bg) (error nil))))
2423         (if sat
2424             (if (hexrgb-approx-equal sat 0.0)
2425                 (icicle-increment-color-value
2426                  bg                     ; Grayscale - change bg value slightly.
2427                  (if (eq (frame-parameter nil 'background-mode) 'dark) 20 -10))
2428               (icicle-increment-color-hue bg 24)) ; Color - change bg hue slightly.
2429           (face-background 'region)))
2430     (face-background 'region))          ; Use normal region background.
2431   "*Background color to use for the region during minibuffer cycling.
2432 This has no effect if `icicle-change-region-background-flag' is nil.
2433 If you do not define this explicitly, and if you have loaded library
2434 `hexrgb.el' (recommended), then this color will be slightly
2435 different from your frame background.  This still lets you notice the
2436 region, but it makes the region less conspicuous, so you can more
2437 easily read your minibuffer input."
2438   :type (if (and (require 'wid-edit nil t) (get 'color 'widget-type)) 'color 'string)
2439   :group 'Icicles-Minibuffer-Display)
2440
2441 ;;;###autoload
2442 (defcustom icicle-require-match-flag nil
2443   "*Control REQUIRE-MATCH arg to `completing-read' and `read-file-name'.
2444 The possible values are as follows:
2445 - nil means this option imposes nothing on completion;
2446   the REQUIRE-MATCH argument provided to the function governs behavior
2447 - `no-match-required' means the same as a nil value for REQUIRE-MATCH
2448 - `partial-match-ok' means the same as a t value for REQUIRE-MATCH
2449 - `full-match-required' means the same as a non-nil, non-t value for
2450   REQUIRE-MATCH
2451
2452 Note: This option is provided mainly for use (binding) in
2453 `icicle-define-command' and `icicle-define-file-command'.
2454 You probably do not want to set this globally, but you can."
2455   :type '(choice
2456           (const :tag "Do not impose any match behavior"   nil)
2457           (const :tag "Do not require a match"             no-match-required)
2458           (const :tag "Require a partial match, with RET"  partial-match-ok)
2459           (const :tag "Require a full match"               full-match-required))
2460   :group 'Icicles-Matching)
2461
2462 ;;;###autoload
2463 (defcustom icicle-saved-completion-sets nil
2464   "*Completion sets available for `icicle-candidate-set-retrieve'.
2465 The form is ((SET-NAME . CACHE-FILE-NAME)...), where SET-NAME is the
2466 name of a set of completion candidates and CACHE-FILE-NAME is the
2467 absolute name of the cache file that contains those candidates.
2468 You normally do not customize this directly, statically.
2469 Instead, you add or remove sets using commands
2470 `icicle-add/update-saved-completion-set' and
2471 `icicle-remove-saved-completion-set'."
2472   :type '(repeat (cons string file)) :group 'Icicles-Matching)
2473
2474 ;;;###autoload
2475 (defcustom icicle-search-cleanup-flag t
2476   "*Controls whether to remove highlighting after a search.
2477 If this is nil, highlighting can be removed manually with
2478 `\\[icicle-search-highlight-cleanup]'.
2479
2480 You can toggle this option from the minibuffer during Icicles
2481 search (e.g., `C-c`') using `C-.'."
2482   :type 'boolean :group 'Icicles-Searching)
2483
2484 ;;;###autoload
2485 (defcustom icicle-search-from-isearch-keys '([S-tab] [S-iso-lefttab]) ; `S-TAB'
2486   ;; $$$$$ The following should be sufficient, but some Emacs 22+ libraries, such as `info.el',
2487   ;; are brain-dead and explicitly bind both `backtab' and `S-tab'.  I filed Emacs bug #1281.
2488   ;;   (if (> emacs-major-version 21)
2489   ;;       '([backtab])
2490   ;;     '([S-tab] [S-iso-lefttab]))
2491   "*Key sequences to use to start `icicle-search' from Isearch.
2492 A list of values that each has the same form as a key-sequence
2493 argument to `define-key'.  It is a list mainly in order to accommodate
2494 different keyboards - for example, `S-tab' and `S-iso-lefttab'."
2495 ;; In Emacs 22 and later, `backtab' is the canonical key that represents
2496 ;; both `S-tab' and `S-iso-lefttab', so that is used in the default
2497 ;; value.  If, for some reason, `backtab' is not being translated to
2498 ;; `S-tab' and `S-iso-lefttab' on your platform, you might want to
2499 ;; customize the value to ([S-tab] [S-iso-lefttab]).  And if your Emacs
2500 ;; version is 22 or later, please file an Emacs bug about the lack of
2501 ;; translation.
2502   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
2503
2504 ;;;###autoload
2505 (defcustom icicle-search-highlight-all-current-flag nil ; Toggle with `C-^'.
2506   "*Non-nil means highlight input match in each context search hit.
2507 Setting this to non-nil can impact performance negatively, because the
2508 highlighting is updated with each input change.  You can toggle this
2509 option from the minibuffer during Icicles search (e.g., `C-c`') using
2510 `C-^'."
2511   :type 'boolean :group 'Icicles-Searching)
2512
2513 ;;;###autoload
2514 (defcustom icicle-search-highlight-context-levels-flag t
2515   "*Non-nil means highlight 1-8 context levels, within the search context.
2516 Level highlighting is done only when this is non-nil and a subgroup is
2517 not used as the search context, that is, the context corresponds to
2518 the entire search regexp."
2519   :type 'boolean :group 'Icicles-Searching)
2520
2521 ;;;###autoload
2522 (defcustom icicle-search-highlight-threshold 100000
2523   "*Max number of context search hits to highlight at once.
2524 This highlighting uses face `icicle-search-main-regexp-others'."
2525   :type 'integer :group 'Icicles-Searching)
2526
2527 ;;;###autoload
2528 (defcustom icicle-search-hook nil
2529   "*List of functions run by `icicle-search' after you visit a search hit.
2530 See `run-hooks'."
2531   :type 'hook :group 'Icicles-Searching)
2532
2533 ;;;###autoload
2534 (defcustom icicle-search-replace-common-match-flag t ; Toggle with `M-;'.
2535   "*Non-nil means to replace the expanded common match of your input.
2536 This has no effect if either
2537 `icicle-search-highlight-all-current-flag' or
2538 `icicle-expand-input-to-common-match-flag' is nil.
2539 You can toggle those options from the minibuffer using `C-^' and
2540 `C-|', respectively.  You can toggle
2541 `icicle-search-replace-common-match-flag' using `M-;'."
2542   :type 'boolean :group 'Icicles-Searching)
2543
2544 ;;;###autoload
2545 (defcustom icicle-search-replace-literally-flag nil ; Toggle with `M-`'.
2546   "*Non-nil means to treat replacement text literally.
2547 Otherwise (nil), interpret `\\' specially in replacement text, as in
2548 the LITERAL argument to `replace-match'.
2549
2550 You can use `M-`' to toggle this at any time during Icicles search."
2551   :type 'boolean :group 'Icicles-Searching)
2552
2553 ;;;###autoload
2554 (defcustom icicle-search-replace-whole-candidate-flag t ; Toggle with `C-,'.
2555   "*Non-nil means replacement during search replaces the entire search hit.
2556 Otherwise (nil), replace only what matches your current input.
2557
2558 You can use `C-,' to toggle this at any time during Icicles search."
2559   :type 'boolean :group 'Icicles-Searching)
2560
2561 ;;;###autoload
2562 (defcustom icicle-search-ring-max (if (boundp 'most-positive-fixnum)
2563                                              (/ most-positive-fixnum 10)
2564                                            13421772) ; 1/10 of `most-positive-fixnum' on Windows.
2565   "*Icicles version of `search-ring-max'."
2566   :type 'integer :group 'Icicles-Searching)
2567
2568 ;;;###autoload
2569 (defcustom icicle-search-whole-word-flag nil ; Toggle with `M-q'.
2570   "*Non-nil means that `icicle-search' looks for a whole word.
2571 You can use `M-q' to toggle this at any time during Icicles search;
2572 the new value takes effect for the next complete search.
2573
2574 Whole-word searching here means that matches can contain embedded
2575 strings of non word-constituent chars (they are skipped over, when
2576 matching, included in the match), and any leading or trailing
2577 word-constituent chars in the search string are dropped (ignored for
2578 matching, not included in the match).  This means, for instance, that
2579 you can match `foo-bar' as a word, even in contexts (such as Emacs
2580 Lisp) where `-' is not a word-constituent character.  Similarly, you
2581 can include embedded whitespace in a \"word\", e.g., `foo bar'."
2582   :type 'boolean :group 'Icicles-Searching)
2583
2584 ;; Based more or less on `shell-dynamic-complete-as-command'.
2585 ;; Must be before `icicle-shell-command-candidates-cache'.
2586 (defun icicle-compute-shell-command-candidates ()
2587   "Compute shell command candidates from search path, and return them.
2588 The candidates are the executable files in your search path or, if
2589 `shell-completion-execonly' is nil, all files in your search path."
2590   (require 'shell)                      ; `shell-completion-execonly'
2591   (message "Finding commands in search path...")
2592   (let* ((filenondir         "")
2593          (path-dirs          (cdr (reverse exec-path)))
2594          (cwd                (file-name-as-directory (expand-file-name default-directory)))
2595          (ignored-extensions (and comint-completion-fignore
2596                                   (mapconcat #'(lambda (x) (concat (regexp-quote x) "$"))
2597                                              comint-completion-fignore "\\|")))
2598          (dir                "")
2599          (comps-in-dir       ())
2600          (file               "")
2601          (abs-file-name      "")
2602          (completions        ()))
2603     ;; Go through each dir in the search path, finding completions.
2604     (while path-dirs
2605       (setq dir           (file-name-as-directory (comint-directory (or (car path-dirs) ".")))
2606             comps-in-dir  (and (file-accessible-directory-p dir)
2607                                (file-name-all-completions filenondir dir)))
2608       ;; Go  see whether it should be used.
2609       (while comps-in-dir
2610         (setq file           (car comps-in-dir)
2611               abs-file-name  (concat dir file))
2612         (when (and (not (member file completions))
2613                    (not (and ignored-extensions (string-match ignored-extensions file)))
2614                    (or (string-equal dir cwd) (not (file-directory-p abs-file-name)))
2615                    (or (null shell-completion-execonly) (file-executable-p abs-file-name)))
2616           (setq completions  (cons file completions)))
2617         (setq comps-in-dir  (cdr comps-in-dir)))
2618       (setq path-dirs  (cdr path-dirs)))
2619     completions))
2620
2621 ;;;###autoload
2622 (defcustom icicle-shell-command-candidates-cache (and (eq icicle-guess-commands-in-path 'load)
2623                                                       (icicle-compute-shell-command-candidates))
2624   "*Cache for shell command candidates.
2625 You typically do not need to customize this option.
2626 It is an option mainly to persist its value.
2627 See `icicle-guess-commands-in-path'."
2628   :type '(repeat sexp) :group 'Icicles-Miscellaneous)
2629
2630 (if (and (fboundp 'defvaralias) (boundp 'completion-show-help))
2631     (defvaralias 'icicle-show-Completions-help-flag 'completion-show-help)
2632   (defcustom icicle-show-Completions-help-flag t
2633     "*Non-nil means display help lines at the top of buffer `*Completions*'."
2634     :type 'boolean :group 'Icicles-Completions-Display))
2635
2636 ;;;###autoload
2637 (defcustom icicle-show-Completions-initially-flag nil
2638   "*Non-nil means to show buffer `*Completions*' even without user input.
2639 nil means that `*Completions*' is shown upon demand, via `TAB' or
2640 `S-TAB'.
2641
2642 For an alternative but similar behavior to using non-nil for
2643 `icicle-show-Completions-initially-flag', you can set option
2644 `icicle-incremental-completion-flag' to a value that is neither nil
2645 nor t.  That displays buffer `*Completions*' as soon as you type or
2646 delete input, but not initially."
2647   :type 'boolean :group 'Icicles-Completions-Display)
2648
2649 ;;;###autoload
2650 (defcustom icicle-show-multi-completion-flag t
2651   "*Non-nil means to show completion candidates as multi-completions.
2652 This has an effect only where multi-completion is available.
2653 Also, some commands, such as `icicle-locate-file', use a prefix arg to
2654 determine whether to show multi-completions.  Such commands generally
2655 ignore this option.
2656
2657 A typical example of showing multi-completions is adding buffer names
2658 to candidates to show which buffer they are associated with.  Some
2659 commands, such as `icicle-search', append the name of the associated
2660 buffer, highlighted, to the normal completion candidate.  This lets
2661 you easily see which buffer the candidate applies to.  Also, the
2662 buffer name is part of the candidate, so you can match against it.
2663
2664 Note: Even when the option value is nil, you can use `C-M-mouse-2' and
2665 so on to see information about a candidate.  This information
2666 typically includes whatever a non-nil value of the option would have
2667 shown.
2668
2669 You can toggle this option from the minibuffer using `M-m'.  The new
2670 value takes effect after you exit the minibuffer (i.e., for the next
2671 command)."
2672   :type 'boolean :group 'Icicles-Completions-Display)
2673
2674 ;; This is similar to `bmkp-sort-comparer'.
2675 ;;;###autoload
2676 (defcustom icicle-sort-comparer 'icicle-case-string-less-p ; Cycle with `C-,'.
2677   "*Predicate or predicates for sorting (comparing) two items.
2678 Used in particular to sort completion candidates.  In that case, this
2679 determines the order of candidates when cycling and their order in
2680 buffer `*Completions*'.
2681
2682 When `icicle-cycle-into-subdirs-flag' is non-nil, you might want to
2683 use a function such as `icicle-dirs-last-p' for this option, to
2684 prevent cycling into subdirectories depth first.  Command
2685 `icicle-sort-by-directories-last' does that.
2686
2687 You can cycle completion sort orders at any time using `C-,' in the
2688 minibuffer.
2689
2690 Although this is a user option, it may be changed by program
2691 locally, for use in particular contexts.  In particular, you can bind
2692 this to nil in an Emacs-Lisp function, to inhibit sorting in that
2693 context.
2694
2695 Various sorting commands change the value of this option dynamically
2696 \(but they do not save the changed value).
2697
2698 The value must be one of the following:
2699
2700 * nil, meaning do not sort
2701
2702 * a predicate that takes two items as args
2703
2704 * a list of the form ((PRED...) FINAL-PRED), where each PRED and
2705   FINAL-PRED are binary predicates
2706
2707 If the value is a non-empty list, then each PRED is tried in turn
2708 until one returns a non-nil value.  In that case, the result is the
2709 car of that value.  If no non-nil value is returned by any PRED, then
2710 FINAL-PRED is used and its value is the result.
2711
2712 Each PRED should return `(t)' for true, `(nil)' for false, or nil for
2713 undecided.  A nil value means that the next PRED decides (or
2714 FINAL-PRED, if there is no next PRED).
2715
2716 Thus, a PRED is a special kind of predicate that indicates either a
2717 boolean value (as a singleton list) or \"I cannot decide - let the
2718 next guy else decide\".  (Essentially, each PRED is a hook function
2719 that is run using `run-hook-with-args-until-success'.)
2720
2721 Examples:
2722
2723  nil           - No sorting.
2724
2725  string-lessp  - Single predicate that returns nil or non-nil.
2726
2727  ((p1 p2))     - Two predicates `p1' and `p2', which each return
2728                  (t) for true, (nil) for false, or nil for undecided.
2729
2730  ((p1 p2) string-lessp)
2731                - Same as previous, except if both `p1' and `p2' return
2732                  nil, then the return value of `string-lessp' is used.
2733
2734 Note that these two values are generally equivalent, in terms of their
2735 effect (*):
2736
2737  ((p1 p2))
2738  ((p1) p2-plain) where p2-plain is (icicle-make-plain-predicate p2)
2739
2740 Likewise, these three values generally act equivalently:
2741
2742  ((p1))
2743  (() p1-plain)
2744  p1-plain        where p1-plain is (icicle-make-plain-predicate p1)
2745
2746 The PRED form lets you easily combine predicates: use `p1' unless it
2747 cannot decide, in which case try `p2', and so on.  The value ((p2 p1))
2748 tries the predicates in the opposite order: first `p2', then `p1' if
2749 `p2' returns nil.
2750
2751 Using a single predicate or FINAL-PRED makes it easy to reuse an
2752 existing predicate that returns nil or non-nil.
2753
2754 You can also convert a PRED-type predicate (which returns (t), (nil),
2755 or nil) into an ordinary predicate, by using function
2756 `icicle-make-plain-predicate'.  That lets you reuse elsewhere, as
2757 ordinary predicates, any PRED-type predicates you define.
2758
2759 Note: As a convention, predefined Icicles PRED-type predicate names
2760 have the suffix `-cp' (for \"component predicate\") instead of `-p'."
2761   ;; We don't bother to define a `icicle-reverse-multi-sort-order'
2762   ;; analogous to `bmkp-reverse-multi-sort-order'.  If we did, the doc
2763   ;; string would need to be updated to say what the doc string of
2764   ;; `bmkp-sort-comparer' says about `bmkp-reverse-multi-sort-order'.
2765   :type '(choice
2766           (const    :tag "None (do not sort)" nil)
2767           (function :tag "Sorting Predicate")
2768           (list     :tag "Sorting Multi-Predicate"
2769            (repeat (function :tag "Component Predicate"))
2770            (choice
2771             (const    :tag "None" nil)
2772             (function :tag "Final Predicate"))))
2773   :group 'Icicles-Matching :group 'Icicles-Completions-Display)
2774
2775 ;;;###autoload
2776 (defcustom icicle-buffer-configs
2777   `(("All" nil nil nil nil ,icicle-sort-comparer)
2778     ("Files" nil nil (lambda (bufname) (buffer-file-name (get-buffer bufname))) nil
2779      ,icicle-sort-comparer)
2780     ("Files and Scratch" nil nil (lambda (bufname) (buffer-file-name (get-buffer bufname)))
2781      ("*scratch*") ,icicle-sort-comparer)
2782     ("All, *...* Buffers Last" nil nil nil nil icicle-buffer-sort-*...*-last))
2783   "*List of option configurations available for `icicle-buffer-config'.
2784 The form is (CONFIG...), where CONFIG is a list of these items:
2785
2786  - Configuration name                    (string)
2787  - `icicle-buffer-match-regexp' value    (regexp string)
2788  - `icicle-buffer-no-match-regexp' value (regexp string)
2789  - `icicle-buffer-predicate' value       (function)
2790  - `icicle-buffer-extras' value          (list of strings)
2791  - `icicle-buffer-sort' value            (function)
2792
2793 A configuration describes which buffer names are displayed during
2794 completion and their order."
2795   :type '(repeat (list
2796                   string                ; Configuration name
2797                   (choice (const :tag "None" nil) (string :tag "Match regexp"))
2798                   (choice (const :tag "None" nil) (string :tag "No-match regexp"))
2799                   (choice (const :tag "None" nil) (function :tag "Predicate")) ; Predicate
2800                   (choice (const :tag "None" nil) (repeat (string :tag "Extra buffer")))
2801                   (choice (const :tag "None" nil) (function :tag "Sort function"))))
2802   :group 'Icicles-Buffers)
2803
2804 (defun icicle-buffer-sort-*...*-last (buf1 buf2)
2805   "Return non-nil if BUF1 is `string<' BUF2 or only BUF2 starts with \"*\"."
2806   (let ((b1  (if completion-ignore-case (downcase buf1) buf1))
2807         (b2  (if completion-ignore-case (downcase buf2) buf2)))
2808     (if (string-match "^\\*" b1)
2809         (and (string-match "^\\*" b2) (string< b1 b2))
2810       (or (string-match "^\\*" b2) (string< b1 b2)))))
2811
2812 (when (> emacs-major-version 20)
2813   (defcustom icicle-sort-orders-alist ()
2814     "*Alist of available sort functions.
2815 This is a pseudo option - you probably do NOT want to customize this.
2816 Instead, use macro `icicle-define-sort-command' to define a new sort
2817 function and automatically add it to this list.
2818
2819 Each alist element has the form (SORT-ORDER . COMPARER):
2820
2821  SORT-ORDER is a short string or symbol describing the sort order.
2822  Examples: \"by date\", \"alphabetically\", \"directories first\".
2823
2824  COMPARER compares two items.  It must be acceptable as a value of
2825  `icicle-sort-comparer'."
2826     :type '(alist
2827             :key-type (choice :tag "Sort order" string symbol)
2828             :value-type (choice
2829                          (const    :tag "None (do not sort)" nil)
2830                          (function :tag "Sorting Predicate")
2831                          (list     :tag "Sorting Multi-Predicate"
2832                           (repeat (function :tag "Component Predicate"))
2833                           (choice
2834                            (const    :tag "None" nil)
2835                            (function :tag "Final Predicate")))))
2836     :group 'Icicles-Completions-Display :group 'Icicles-Matching))
2837
2838 (unless (> emacs-major-version 20)      ; Emacs 20: custom type `alist' doesn't exist.
2839   (defcustom icicle-sort-orders-alist ()
2840     "*Alist of available sort functions.
2841 This is a pseudo option - you probably do NOT want to customize this.
2842 Instead, use macro `icicle-define-sort-command' to define a new sort
2843 function and automatically add it to this list.
2844
2845 Each alist element has the form (SORT-ORDER . COMPARER):
2846
2847  SORT-ORDER is a short string or symbol describing the sort order.
2848  Examples: \"by date\", \"alphabetically\", \"directories first\".
2849
2850  COMPARER compares two items.  It must be acceptable as a value of
2851  `icicle-sort-comparer'."
2852     :type '(repeat
2853             (cons
2854              (choice :tag "Sort order" string symbol)
2855              (choice
2856               (const    :tag "None (do not sort)" nil)
2857               (function :tag "Sorting Predicate")
2858               (list     :tag "Sorting Multi-Predicate"
2859                (repeat (function :tag "Component Predicate"))
2860                (choice
2861                 (const    :tag "None" nil)
2862                 (function :tag "Final Predicate"))))))
2863     :group 'Icicles-Completions-Display :group 'Icicles-Matching))
2864
2865 ;;;###autoload
2866 (defcustom icicle-special-candidate-regexp nil
2867   "*Regexp to match special completion candidates, or nil to do nothing.
2868 The candidates are highlighted in buffer `*Completions*' using face
2869 `icicle-special-candidate'."
2870   :type '(choice (const :tag "None" nil) regexp) :group 'Icicles-Completions-Display)
2871
2872 ;;;###autoload
2873 (defcustom icicle-S-TAB-completion-methods-alist ; Cycle with `M-('.
2874   `(("apropos" . string-match)
2875     ("scatter" . icicle-scatter-match)
2876     ,@(and (require 'fuzzy nil t)       ; `fuzzy.el', part of library Autocomplete.
2877            '(("Jaro-Winkler" . fuzzy-match)))
2878     ,@(and (require 'levenshtein nil t)
2879            '(("Levenshtein" . icicle-levenshtein-match)
2880              ("Levenshtein strict" . icicle-levenshtein-strict-match))))
2881   "*Alist of completion methods used by `S-TAB'.
2882 Each element has the form (NAME . FUNCTION), where NAME is a string
2883 name and FUNCTION is the completion match function.  NAME is used in
2884 messages to indicate the type of completion matching.
2885
2886 By default, `S-TAB' is the key for this completion. The actual keys
2887 used are the value of option `icicle-apropos-complete-keys'.
2888
2889 See also options `icicle-TAB-completion-methods' and
2890 `icicle-S-TAB-completion-methods-per-command'."
2891   :type '(alist
2892           :key-type   (string :tag "Name used in messages")
2893           :value-type (symbol :tag "Completion matching function"))
2894   :group 'Icicles-Matching)
2895
2896 ;;;###autoload
2897 (defcustom icicle-S-TAB-completion-methods-per-command ()
2898   "*Alist of commands and their available S-TAB completion methods.
2899 Each command is advised so that when invoked only the specified S-TAB
2900 completion methods are available for it when you use `M-('.  (This
2901 makes sense only for commands that read input from the minibuffer.)
2902
2903 This option gives you greater control over which completion methods
2904 are available.  See also option
2905 `icicle-TAB-completion-methods-per-command', which does the same thing
2906 for `TAB' completion.  The default behavior is provided by option
2907 `icicle-S-TAB-completion-methods-alist' (and
2908 `icicle-TAB-completion-methods' for `TAB').
2909
2910 NOTE: If you remove an entry from this list, that does NOT remove the
2911 advice for that command.  To do that you will need to explicitly
2912 invoke command `icicle-set-S-TAB-methods-for-command' using a negative
2913 prefix argument (or else start a new Emacs session)."
2914   :type (let ((methods  ()))
2915           (when (require 'levenshtein nil t)
2916             (push '(const :tag "Levenshtein strict"
2917                     ("Levenshtein strict" . icicle-levenshtein-strict-match))
2918                   methods)
2919             (push '(const :tag "Levenshtein" ("Levenshtein" . icicle-levenshtein-match))
2920                   methods))
2921           (when (require 'fuzzy nil t) ; `fuzzy.el', part of library Autocomplete.
2922             (push '(const :tag "Jaro-Winkler" ("Jaro-Winkler" . fuzzy-match)) methods))
2923           (push '(const :tag "scatter" ("scatter" . icicle-scatter-match)) methods)
2924           (push '(const :tag "apropos" ("apropos" . string-match)) methods)
2925           `(alist
2926             :key-type   (restricted-sexp
2927                          :tag "Command"
2928                          ;; Use `symbolp' instead of `commandp', in case the library
2929                          ;; defining the command is not yet loaded.
2930                          :match-alternatives (symbolp) :value ignore)
2931             :value-type (repeat :tag "S-TAB completion methods" (choice ,@methods))))
2932   :set #'(lambda (sym val)
2933            (custom-set-default sym val)
2934            (when (fboundp 'icicle-set-S-TAB-methods-for-command)
2935              (dolist (entry  val)
2936                (icicle-set-S-TAB-methods-for-command (car entry) (cdr entry)))))
2937   :initialize #'custom-initialize-default
2938   :group 'Icicles-matching)
2939             
2940 ;;;###autoload
2941 (defcustom icicle-swank-prefix-length 1
2942   "*Length (chars) of symbol prefix that much match, for swank completion."
2943   :type 'integer :group 'Icicles-Matching)
2944
2945 ;;;###autoload
2946 (defcustom icicle-swank-timeout 3000
2947   "*Number of msec before swank (fuzzy symbol) completion gives up."
2948   :type 'integer :group 'Icicles-Matching)
2949
2950 ;;;###autoload
2951 (defcustom icicle-TAB-completion-methods ; Cycle with `C-('.
2952   (let ((methods  ()))
2953     (when (require 'el-swank-fuzzy nil t) (push 'swank        methods))
2954     (when (require 'fuzzy-match nil t)    (push 'fuzzy        methods))
2955     (when (boundp 'completion-styles)     (push 'vanilla      methods))
2956     (push 'basic methods)
2957     methods)
2958   "*List of completion methods to use for \
2959 `\\<minibuffer-local-completion-map>\\[icicle-prefix-complete]'.
2960 The first method in the list is the default method.
2961
2962 The available methods can include these:
2963
2964 1. `basic'
2965 2. `vanilla' (provided you have Emacs 23 or later)
2966 3. `fuzzy'   (provided you have library `fuzzy-match.el')
2967 4. `swank'   (provided you have library `el-swank-fuzzy.el')
2968
2969 1. Basic completion means ordinary prefix completion. It is the
2970 `basic' completion style of Emacs 23 or later, and it is essentially
2971 the completion style prior to Emacs 23 (Emacs 22 completion was
2972 slightly different - see Emacs 23 option `custom-styles' for more
2973 info).
2974
2975 2. Vanilla completion respects option `completion-styles' (new in
2976 Emacs 23), so that `TAB' behaves similarly in Icicles to what it does
2977 in vanilla Emacs.  The vanilla method also completes environment
2978 variables during file-name completion and in shell commands.  The
2979 non-vanilla methods do not complete environment variables, but the
2980 variables are expanded to their values when you hit `RET'.
2981
2982 3. Fuzzy completion is a form of prefix completion in which matching
2983 finds the candidates that have the most characters in common with your
2984 input, in the same order, and with a minimum of non-matching
2985 characters.  It can skip over non-matching characters, as long as the
2986 number of characters skipped in the candidate is less that those
2987 following them that match.  After the matching candidates are found,
2988 they are sorted by skip length and then candidate length.
2989
2990 Fuzzy completion is described in detail in the commentary of library
2991 `fuzzy-match.el'.  There is no fuzzy completion of file names - fuzzy
2992 completion is the same as basic for file names.  Fuzzy completion is
2993 always case-sensitive.
2994
2995 4. Swank completion in Icicles is the same as fuzzy completion, except
2996 regarding symbols.  That is, swank completion per se applies only to
2997 symbols.  Symbols are completed using the algorithm of library
2998 `el-swank-fuzzy.el'.
2999
3000 Icicles options `icicle-swank-timeout' and
3001 `icicle-swank-prefix-length' give you some control over the behavior.
3002 When the `TAB' completion method is `swank', you can use `C-x 1'
3003 \(`icicle-doremi-increment-swank-timeout+') and `C-x 2'
3004 \(`icicle-doremi-increment-swank-prefix-length+') in the minibuffer to
3005 increment these options on the fly using the arrow keys `up' and
3006 `down'.
3007
3008 Swank symbol completion uses heuristics that relate to supposedly
3009 typical patterns found in symbol names.  It also uses a timeout that
3010 can limit the number of matches.  It is generally quite a bit slower
3011 than fuzzy completion, and it sometimes does not provide all
3012 candidates that you might think should match, even when all of your
3013 input is a prefix (or even when it is already complete!).  If swank
3014 completion produces no match when you think it should, remember that
3015 you can use `\\[icicle-next-TAB-completion-method]' on the fly to \
3016 change the completion method.
3017
3018
3019 If you do not customize `icicle-TAB-completion-methods', then the
3020 default value (that is, the available `TAB' completion methods) will
3021 reflect your current Emacs version and whether you have loaded
3022 libraries `fuzzy-match.el' and `el-swank-fuzzy.el'.
3023
3024 By default, `TAB' is the key for this completion. The actual keys
3025 used are the value of option `icicle-prefix-complete-keys'.
3026
3027 See also options `icicle-TAB-completion-methods-per-command'
3028 `icicle-S-TAB-completion-methods-alist'."
3029   :type (let ((methods  ()))
3030           (when (require 'el-swank-fuzzy nil t)
3031             (push '(const :tag "Swank (Fuzzy Symbol)" swank) methods))
3032           (when (require 'fuzzy-match nil t)
3033             (push '(const :tag "Fuzzy" fuzzy) methods))
3034           (when (boundp 'completion-styles)
3035             (push '(const :tag "Vanilla `completion-styles'" vanilla) methods))
3036           (push '(const :tag "Basic" basic) methods)
3037           `(repeat (choice ,@methods)))
3038   :group 'Icicles-Matching)
3039
3040 ;;;###autoload
3041 (defcustom icicle-TAB-completion-methods-per-command ()
3042   "*Alist of commands and their available TAB completion methods.
3043 Each command is advised so that when invoked only the specified TAB
3044 completion methods are available for it when you use `C-('.  (This
3045 makes sense only for commands that read input from the minibuffer.)
3046
3047 This option gives you greater control over which completion methods
3048 are available.  See also option
3049 `icicle-S-TAB-completion-methods-per-command', which does the same
3050 thing for `S-TAB' completion.  The default behavior is provided by
3051 option `icicle-TAB-completion-methods' (and
3052 `icicle-S-TAB-completion-methods-alist' for `S-TAB').
3053
3054 NOTE: If you remove an entry from this list, that does NOT remove the
3055 advice for that command.  To do that you will need to explicitly
3056 invoke command `icicle-set-TAB-methods-for-command' using a negative
3057 prefix argument (or else start a new Emacs session)."
3058   :type (let ((methods  ()))
3059           (when (require 'el-swank-fuzzy nil t)
3060             (push '(const :tag "Swank (Fuzzy Symbol)" swank) methods))
3061           (when (require 'fuzzy-match nil t)
3062             (push '(const :tag "Fuzzy" fuzzy) methods))
3063           (when (boundp 'completion-styles)
3064             (push '(const :tag "Vanilla `completion-styles'" vanilla) methods))
3065           (push '(const :tag "Basic" basic) methods)
3066           `(alist
3067             :key-type   (restricted-sexp
3068                          :tag "Command"
3069                          ;; Use `symbolp' instead of `commandp', in case the library
3070                          ;; defining the command is not yet loaded.
3071                          :match-alternatives (symbolp) :value ignore)
3072             :value-type (repeat :tag "TAB completion methods" (choice ,@methods))))
3073   :set #'(lambda (sym val)
3074            (custom-set-default sym val)
3075            (when (fboundp 'icicle-set-TAB-methods-for-command)
3076              (dolist (entry  val)
3077                (icicle-set-TAB-methods-for-command (car entry) (cdr entry)))))
3078   :initialize #'custom-initialize-default
3079   :group 'Icicles-Matching)
3080
3081 ;;;###autoload
3082 (defcustom icicle-TAB-shows-candidates-flag t
3083   "*Non-nil means that `TAB' always shows completion candidates.
3084 Otherwise (nil), follow the standard Emacs behavior of completing to
3085 the longest common prefix, and only displaying the candidates after a
3086 second `TAB'.
3087
3088 Actually, the concerned keys are those defined by option
3089 `icicle-prefix-complete-keys', not necessarily `TAB'."
3090   :type 'boolean :group 'Icicles-Key-Bindings)
3091
3092 ;;;###autoload
3093 (defcustom icicle-recenter -4
3094   "Argument passed to `recenter' to recenter point in the target window.
3095 Used during functions such as `icicle-search' when the destination to
3096 visit would otherwise be off-screen."
3097   :type '(choice
3098           (const   :tag "To mid-window" nil)
3099           (integer :tag "On this line number (negative: from bottom)" nil))
3100   :group 'Icicles-Miscellaneous)
3101
3102 ;;;###autoload
3103 (defcustom icicle-test-for-remote-files-flag t ; Toggle with `C-^'.
3104   "*Non-nil means Icicles tests for remote file names.
3105 A value of nil turns off all handling of remote file names by Tramp,
3106 including file-name completion.
3107
3108 The testing due to a non-nil value takes a little time, but the test
3109 result saves time with Tramp handling, and it is used to avoid some
3110 other costly operations when a file is determined to be remote.  These
3111 operations are (a) incremental completion and (b) highlighting of the
3112 part of your current input that does not complete.
3113
3114 Use a nil value only when you are sure that the file names you are
3115 completing are local.  The effect will be a slight speed increase for
3116 operations (a) and (b) for local files.
3117
3118 In addition, a nil value has the effect of ignoring the restriction of
3119 input mismatch highlighting to strict completion.  That is, it treats
3120 an `icicle-highlight-input-completion-failure' value of
3121 `explicit-strict' or `implicit-strict' as if it were `implicit'.  The
3122 assumption here is that you use these highlighting values only to
3123 avoid the cost of remote file name completion.
3124
3125 You can toggle this option from the minibuffer using `C-^' (except
3126 during Icicles search)."
3127   :initialize (lambda (opt-name val) (set opt-name t))
3128   :set #'(lambda (opt-name val)
3129            (or (not (require 'tramp nil t))
3130                (prog1 (set opt-name (not val))
3131                  (icicle-toggle-remote-file-testing))))
3132   :type 'boolean :group 'Icicles-Matching)
3133
3134 ;;;###autoload
3135 (defcustom icicle-thing-at-point-functions
3136   (progn (or (require 'ffap- nil t) (require 'ffap nil t)) ; Try `ffap-.el' first.
3137          (cons
3138           `(,(if (fboundp 'non-nil-symbol-name-nearest-point)
3139                  'non-nil-symbol-name-nearest-point
3140                  (lambda () (symbol-name (symbol-at-point))))
3141             ,(if (fboundp 'word-nearest-point)
3142                  'word-nearest-point
3143                  (lambda () (thing-at-point 'word)))
3144             ,@(and (fboundp 'list-nearest-point-as-string) '(list-nearest-point-as-string))
3145             ,@(and (fboundp 'list-nearest-point-as-string)
3146                    '((lambda () (list-nearest-point-as-string 2))))
3147             ,@(and (fboundp 'list-nearest-point-as-string)
3148                    '((lambda () (list-nearest-point-as-string 3))))
3149             ,@(and (fboundp 'ffap-guesser) '(ffap-guesser))
3150             thing-at-point-url-at-point)
3151           'forward-word))
3152   "*Functions that return a string at or near the cursor when you use `M-.'.
3153 A cons cell whose car and cdr may each be empty.
3154
3155 The car of the cons cell is a list of functions that grab different
3156 kinds of strings at or near point.  They are used in sequence by
3157 command `icicle-insert-string-at-point' (bound to `M-.').  I recommend
3158 that you also use library `thingatpt+.el', so that `M-.' can take
3159 advantage of the string-grabbing functions it defines.
3160
3161 The cdr of the cons cell is nil or a function that advances point one
3162 text thing.  Each time command `icicle-insert-string-at-point' is
3163 called successively, this is called to grab more things of text (of
3164 the same kind).  By default, successive words are grabbed.
3165
3166 If either the car or cdr is empty, then the other alone determines the
3167 behavior of `icicle-insert-string-at-point'.  Otherwise, option
3168 `icicle-default-thing-insertion' determines whether the car or cdr is
3169 used by `icicle-insert-string-at-point'.  `C-u' with no number
3170 reverses the meaning of `icicle-default-thing-insertion'."
3171   :type
3172   '(cons
3173     (choice
3174      (repeat (function :tag "Function to grab some text at point and insert it in minibuffer"))
3175      (const :tag "No alternative text-grabbing functions" nil))
3176     (choice
3177      (const :tag "No function to successively grab more text" nil)
3178      (function :tag "Function to advance point one text thing")))
3179   :group 'Icicles-Miscellaneous)
3180
3181 ;; Must be before `icicle-top-level-key-bindings'.
3182 ;;;###autoload
3183 (define-widget 'icicle-key-definition 'lazy
3184   "Key definition type for Icicle mode keys.
3185 A list of three components: KEY, COMMAND, CONDITION, that represents
3186 an `icicle-mode-map' binding of COMMAND according to KEY, if CONDITION
3187 evaluates to non-nil.
3188
3189 KEY is either a key sequence (string or vector) or a command.
3190 COMMAND is a command.
3191 CONDITION is a sexp.
3192
3193 If KEY is a command, then the binding represented is its remapping to
3194 COMMAND."
3195   :indent 1 :offset 0 :tag ""           ; $$$$$ "Icicle Mode Key Definition"
3196   :type
3197   '(list
3198     (choice
3199      (key-sequence :tag "Key" :value [ignore])
3200      ;; Use `symbolp' instead of `commandp', in case the library defining the
3201      ;; command is not loaded.
3202      (restricted-sexp :tag "Command to remap" :match-alternatives (symbolp) :value ignore))
3203      ;; Use `symbolp' instead of `commandp'...
3204     (restricted-sexp :tag "Command" :match-alternatives (symbolp) :value ignore)
3205     (sexp :tag "Condition")))
3206
3207 ;; Must be before `icicle-top-level-key-bindings'.
3208 (defun icicle-remap (old new map &optional oldmap)
3209   "Bind command NEW in MAP to all keys currently bound to OLD.
3210 If command remapping is available, use that.  Otherwise, bind NEW to
3211 whatever OLD is bound to in MAP, or in OLDMAP, if provided."
3212   (if (fboundp 'command-remapping)
3213       (define-key map (vector 'remap old) new) ; Ignore OLDMAP for Emacs 22.
3214     (substitute-key-definition old new map oldmap)))
3215
3216 ;; Must be before `icicle-top-level-key-bindings'.
3217 (defun icicle-bind-top-level-commands (&optional defs)
3218   "Bind top-level commands for Icicle mode."
3219   (unless defs (setq defs  icicle-top-level-key-bindings))
3220   (let (key command condition)
3221     (dolist (key-def defs)
3222       (setq key        (car key-def)
3223             command    (cadr key-def)
3224             condition  (car (cddr key-def)))
3225       (when (eval condition)
3226         (if (symbolp key)
3227             (icicle-remap key command icicle-mode-map (current-global-map))
3228           (define-key icicle-mode-map key command))))))            
3229
3230 ;; Must be before `icicle-top-level-key-bindings'.
3231 ;;;###autoload
3232 (defcustom icicle-yank-function 'yank
3233   "*Yank function.  A function that takes a prefix argument.  This
3234 should be a command that is bound to whatever key you use to yank
3235 text, whether in Icicle mode or not.  In Icicle mode, command
3236 `icicle-yank-maybe-completing' calls this function, except when
3237 `icicle-yank-maybe-completing' is called from the minibuffer or called
3238 with a negative prefix argument.  `icicle-yank-maybe-completing'
3239 passes the raw prefix argument to `icicle-yank-function'.
3240
3241 By default (see option `icicle-top-level-key-bindings'), the command
3242 that is the value of this option is remapped to
3243 `icicle-yank-maybe-completing' the first time you enter Icicle mode.
3244 If you customize `icicle-yank-function', then, to take advantage of
3245 this default remapping behavior, you will need to save your
3246 customization and then restart Emacs.
3247
3248 Alternatively, you can customize both `icicle-yank-function' and the
3249 corresponding entry in `icicle-top-level-key-bindings', and then
3250 toggle Icicle mode off and then back on."
3251   :type 'function :group 'Icicles-Miscellaneous)
3252
3253 ;;;###autoload
3254 (defcustom icicle-top-level-key-bindings
3255   `((,(kbd "<pause>") icicle-switch-to/from-minibuffer    t) ; `pause'
3256     (,(kbd "C-c `")   icicle-search-generic               t) ; `C-c `'
3257     (,(kbd "C-c $")   icicle-search-word                  t) ; `C-c $'
3258     (,(kbd "C-c ^")   icicle-search-keywords              t) ; `C-c ^'
3259     (,(kbd "C-c '")   icicle-occur                        t) ; `C-c ''
3260     (,(kbd "C-c =")   icicle-imenu                        t) ; `C-c ='
3261     (,(kbd "C-c \"")  icicle-search-text-property         t) ; `C-c "'
3262     (,(kbd "C-c /")   icicle-complete-thesaurus-entry     t) ; `C-c /'
3263     (,(kbd "C-x M-e") icicle-execute-named-keyboard-macro t) ; `C-x M-e'
3264     (,(kbd "C-x SPC") icicle-command-abbrev               t) ; `C-x SPC'
3265     (,(kbd "C-x 5 o") icicle-select-frame                 t) ; `C-x 5 o'
3266     (,(kbd "C-h C-o") icicle-describe-option-of-type      t) ; `C-h C-o'
3267     ,@(and (require 'kmacro nil t)      ; (Emacs 22+)
3268            `((,(kbd "S-<f4>")    icicle-kmacro            t))) ; `S-f4'
3269     (abort-recursive-edit           icicle-abort-recursive-edit        t) ; `C-]'
3270     (bookmark-jump                  icicle-bookmark                    t) ; `C-x r b'
3271     (bookmark-jump-other-window     icicle-bookmark-other-window       t) ; `C-x 4 j j'
3272     (bookmark-set                   icicle-bookmark-cmd                t) ; `C-x r m'
3273     (minibuffer-keyboard-quit      icicle-abort-recursive-edit ; `C-g' (minibuffer - `delsel.el')
3274      (fboundp 'minibuffer-keyboard-quit))
3275     (delete-window                  icicle-delete-window               t) ; `C-x 0'
3276     (delete-windows-for             icicle-delete-window               t) ; `C-x 0' (`frame-cmds.el')
3277     (dired                          icicle-dired                       t) ; `C-x d'
3278     (dired-other-window             icicle-dired-other-window          t) ; `C-x 4 d'
3279     (exchange-point-and-mark        icicle-exchange-point-and-mark     t) ; `C-x C-x'
3280     (execute-extended-command       icicle-execute-extended-command    t) ; `M-x'
3281     (find-file                      icicle-file                        t) ; `C-x C-f'
3282     (find-file-other-window         icicle-file-other-window           t) ; `C-x 4 f'
3283     (find-file-read-only            icicle-find-file-read-only         t) ; `C-x C-r'
3284     (find-file-read-only-other-window
3285      icicle-find-file-read-only-other-window                           t) ; `C-x 4 r'
3286     ;; There are no key bindings in vanilla Emacs for `insert-buffer'.
3287     ;; If you use `setup-keys.el', then these are its bindings: `C-S-insert', `M-S-f1'.
3288     (insert-buffer                  icicle-insert-buffer               t)
3289     (kill-buffer                    icicle-kill-buffer                 t) ; `C-x k'
3290     (kill-buffer-and-its-windows    icicle-kill-buffer                 t) ; `C-x k' (`misc-cmds.el')
3291     (other-window                 icicle-other-window-or-frame         t) ; `C-x o'
3292     (other-window-or-frame        icicle-other-window-or-frame         t) ; `C-x o' (`frame-cmds.el')
3293     (pop-global-mark
3294      icicle-goto-global-marker-or-pop-global-mark                      t) ; `C-x C-@', `C-x C-SPC'
3295     (set-mark-command
3296      icicle-goto-marker-or-set-mark-command                            t) ; `C-@', `C-SPC'
3297     (switch-to-buffer               icicle-buffer                      t) ; `C-x b'
3298     (switch-to-buffer-other-window  icicle-buffer-other-window         t) ; `C-x 4 b'
3299     (where-is                       icicle-where-is                    t) ; `C-h w'
3300     (,icicle-yank-function          icicle-yank-maybe-completing       t) ; `C-y'
3301
3302     ;; These are available only if you use library `bookmark+.el'.
3303     ;;
3304     (,(kbd "C-x j t a a")   icicle-find-file-tagged              (featurep 'bookmark+)) ; `C-x j t a a'
3305     (,(kbd "C-x 4 j t a a") icicle-find-file-tagged-other-window (featurep 'bookmark+)) ; `C-x 4 j t a a'
3306     (bmkp-autofile-set icicle-bookmark-a-file  (fboundp 'bmkp-bookmark-a-file)) ; `C-x p c a'
3307     (bmkp-tag-a-file icicle-tag-a-file         (fboundp 'bmkp-tag-a-file)) ; `C-x p t + a'
3308     (bmkp-untag-a-file icicle-untag-a-file     (fboundp 'bmkp-untag-a-file)) ; `C-x p t - a'
3309     (bmkp-find-file-all-tags
3310      icicle-find-file-all-tags (fboundp 'bmkp-find-file-all-tags)) ; `C-x j t a *'
3311     (bmkp-find-file-all-tags-other-window
3312      icicle-find-file-all-tags-other-window (fboundp 'bmkp-find-file-all-tags)) ; `C-x 4 j t a *'
3313     (bmkp-find-file-all-tags-regexp
3314      icicle-find-file-all-tags-regexp       (fboundp 'bmkp-find-file-all-tags-regexp)) ; `C-x j t a % *'
3315     (bmkp-find-file-all-tags-regexp-other-window
3316      icicle-find-file-all-tags-regexp-other-window
3317      (fboundp 'bmkp-find-file-all-tags-regexp-other-window)) ; `C-x 4 j t a % *'
3318     (bmkp-find-file-some-tags
3319      icicle-find-file-some-tags (fboundp 'bmkp-find-file-some-tags)) ; `C-x j t a +'
3320     (bmkp-find-file-some-tags-other-window
3321      icicle-find-file-some-tags-other-window
3322      (fboundp 'bmkp-find-file-some-tags-other-window)) ; `C-x 4 j t a +'
3323     (bmkp-find-file-some-tags-regexp
3324      icicle-find-file-some-tags-regexp (fboundp 'bmkp-find-file-some-tags-regexp)) ; `C-x j t a % +'
3325     (bmkp-find-file-some-tags-regexp-other-window
3326      icicle-find-file-some-tags-regexp-other-window
3327      (fboundp 'bmkp-find-file-some-tags-regexp-other-window)) ; `C-x 4 j t a % +'
3328     ;;   (Other-window means nothing for a bookmark list or a desktop.)
3329     (bmkp-bookmark-list-jump
3330      icicle-bookmark-bookmark-list (fboundp 'bmkp-bookmark-list-jump)) ; `C-x j B'
3331     (bmkp-desktop-jump icicle-bookmark-desktop (fboundp 'bmkp-desktop-jump)) ; `C-x j K'
3332     (bmkp-dired-jump icicle-bookmark-dired (fboundp 'bmkp-dired-jump)) ; `C-x j d'
3333     (bmkp-dired-jump-other-window
3334      icicle-bookmark-dired-other-window (fboundp 'bmkp-dired-jump)) ; `C-x 4 j d'
3335     (bmkp-file-jump icicle-bookmark-file (fboundp 'bmkp-file-jump)) ; `C-x j f'
3336     (bmkp-file-jump-other-window
3337      icicle-bookmark-file-other-window (fboundp 'bmkp-file-jump)) ; `C-x 4 j f'
3338     (bmkp-file-this-dir-jump
3339      icicle-bookmark-file-this-dir (fboundp 'bmkp-file-this-dir-jump)) ; `C-x j C-f'
3340     (bmkp-file-this-dir-jump-other-window
3341      icicle-bookmark-file-this-dir-other-window (fboundp 'bmkp-file-this-dir-jump)) ; `C-x 4 j C-f'
3342     (bmkp-gnus-jump icicle-bookmark-gnus (fboundp 'bmkp-gnus-jump)) ; `C-x j g'
3343     (bmkp-gnus-jump-other-window
3344      icicle-bookmark-gnus-other-window (fboundp 'bmkp-gnus-jump)) ; `C-x 4 j g'
3345     (bmkp-info-jump icicle-bookmark-info (fboundp 'bmkp-info-jump)) ; `C-x j i'
3346     (bmkp-info-jump-other-window
3347      icicle-bookmark-info-other-window (fboundp 'bmkp-info-jump)) ; `C-x 4 j i'
3348     (bmkp-local-file-jump icicle-bookmark-local-file (fboundp 'bmkp-local-file-jump)) ; `C-x j l'
3349     (bmkp-local-file-jump-other-window
3350      icicle-bookmark-local-file-other-window (fboundp 'bmkp-local-file-jump)) ; `C-x 4 j l'
3351     (bmkp-man-jump icicle-bookmark-man  (fboundp 'bmkp-man-jump)) ; `C-x j m'
3352     (bmkp-man-jump-other-window icicle-bookmark-man-other-window  (fboundp 'bmkp-man-jump)) ; `C-x 4 j m'
3353     (bmkp-non-file-jump icicle-bookmark-non-file (fboundp 'bmkp-non-file-jump)) ; `C-x j b'
3354     (bmkp-non-file-jump-other-window
3355      icicle-bookmark-non-file-other-window (fboundp 'bmkp-non-file-jump)) ; `C-x 4 j b'
3356     (bmkp-region-jump icicle-bookmark-region (fboundp 'bmkp-region-jump)) ; `C-x j r'
3357     (bmkp-region-jump-other-window
3358      icicle-bookmark-region-other-window (fboundp 'bmkp-region-jump)) ; `C-x 4 j r'
3359     (bmkp-remote-file-jump icicle-bookmark-remote-file (fboundp 'bmkp-remote-file-jump)) ; `C-x j n'
3360     (bmkp-remote-file-jump-other-window
3361      icicle-bookmark-remote-file-other-window (fboundp 'bmkp-remote-file-jump)) ; `C-x 4 j n'
3362     (bmkp-specific-buffers-jump
3363      icicle-bookmark-specific-buffers (fboundp 'bmkp-specific-buffers-jump)) ; `C-x j = b'
3364     (bmkp-specific-buffers-jump-other-window
3365      icicle-bookmark-specific-buffers-other-window (fboundp 'bmkp-specific-buffers-jump)) ; `C-x 4 j = b'
3366     (bmkp-specific-files-jump
3367      icicle-bookmark-specific-files (fboundp 'bmkp-specific-files-jump)) ; `C-x j = f'
3368     (bmkp-specific-files-jump-other-window
3369      icicle-bookmark-specific-files-other-window (fboundp 'bmkp-specific-files-jump)) ; `C-x 4 j = f'
3370     (bmkp-this-buffer-jump icicle-bookmark-this-buffer (fboundp 'bmkp-this-buffer-jump)) ; `C-x j .'
3371     (bmkp-this-buffer-jump-other-window
3372      icicle-bookmark-this-buffer-other-window (fboundp 'bmkp-this-buffer-jump)) ; `C-x 4 j .'
3373     (bmkp-all-tags-jump icicle-bookmark-all-tags (fboundp 'bmkp-all-tags-jump)) ; `C-x j t *'
3374     (bmkp-all-tags-jump-other-window
3375      icicle-bookmark-all-tags-other-window (fboundp 'bmkp-all-tags-jump)) ; `C-x 4 j t *'
3376     (bmkp-all-tags-regexp-jump
3377      icicle-bookmark-all-tags-regexp (fboundp 'bmkp-all-tags-regexp-jump)) ; `C-x j t % *'
3378     (bmkp-all-tags-regexp-jump-other-window
3379      icicle-bookmark-all-tags-regexp-other-window (fboundp 'bmkp-all-tags-regexp-jump)) ; `C-x 4 j t % *'
3380     (bmkp-some-tags-jump icicle-bookmark-some-tags (fboundp 'bmkp-some-tags-jump)) ; `C-x j t +'
3381     (bmkp-some-tags-jump-other-window
3382      icicle-bookmark-some-tags-other-window (fboundp 'bmkp-some-tags-jump)) ; `C-x 4 j t +'
3383     (bmkp-some-tags-regexp-jump
3384      icicle-bookmark-some-tags-regexp (fboundp 'bmkp-some-tags-regexp-jump)) ; `C-x j t % +'
3385     (bmkp-some-tags-regexp-jump-other-window
3386      icicle-bookmark-some-tags-regexp-other-window
3387      (fboundp 'bmkp-some-tags-regexp-jump)) ; `C-x 4 j t % +'
3388     (bmkp-file-all-tags-jump
3389      icicle-bookmark-file-all-tags (fboundp 'bmkp-file-all-tags-jump)) ; `C-x j t f *'
3390     (bmkp-file-all-tags-jump-other-window
3391      icicle-bookmark-file-all-tags-other-window (fboundp 'bmkp-file-all-tags-jump)) ; `C-x 4 j t f *'
3392     (bmkp-file-all-tags-regexp-jump
3393      icicle-bookmark-file-all-tags-regexp (fboundp 'bmkp-file-all-tags-regexp-jump)) ; `C-x j t f % *'
3394     (bmkp-file-all-tags-regexp-jump-other-window
3395      icicle-bookmark-file-all-tags-regexp-other-window
3396      (fboundp 'bmkp-file-all-tags-regexp-jump)) ; `C-x 4 j t f % *'
3397     (bmkp-file-some-tags-jump
3398      icicle-bookmark-file-some-tags (fboundp 'bmkp-file-some-tags-jump)) ; `C-x j t f +'
3399     (bmkp-file-some-tags-jump-other-window
3400      icicle-bookmark-file-some-tags-other-window (fboundp 'bmkp-file-some-tags-jump)) ; `C-x 4 j t f +'
3401     (bmkp-file-some-tags-regexp-jump
3402      icicle-bookmark-file-some-tags-regexp (fboundp 'bmkp-file-some-tags-regexp-jump)) ; `C-x j t f % +'
3403     (bmkp-file-some-tags-regexp-jump-other-window
3404      icicle-bookmark-file-some-tags-regexp-other-window
3405      (fboundp 'bmkp-file-some-tags-regexp-jump)) ; `C-x 4 j t f % +'
3406     (bmkp-file-this-dir-all-tags-jump
3407      icicle-bookmark-file-this-dir-all-tags
3408      (fboundp 'bmkp-file-this-dir-all-tags-jump)) ; `C-x j t C-f *'
3409     (bmkp-file-this-dir-all-tags-jump-other-window
3410      icicle-bookmark-file-this-dir-all-tags-other-window
3411      (fboundp 'bmkp-file-this-dir-all-tags-jump)) ; `C-x 4 j t C-f *'
3412     (bmkp-file-this-dir-all-tags-regexp-jump
3413      icicle-bookmark-file-this-dir-all-tags-regexp ; `C-x j t % C-f *'
3414      (fboundp 'bmkp-file-this-dir-all-tags-regexp-jump))
3415     (bmkp-file-this-dir-all-tags-regexp-jump-other-window
3416      icicle-bookmark-file-this-dir-all-tags-regexp-other-window
3417      (fboundp 'bmkp-file-this-dir-all-tags-regexp-jump)) ; `C-x 4 j t % C-f *'
3418     (bmkp-file-this-dir-some-tags-jump
3419      icicle-bookmark-file-this-dir-some-tags
3420      (fboundp 'bmkp-file-this-dir-some-tags-jump)) ; `C-x j t C-f +'
3421     (bmkp-file-this-dir-some-tags-jump-other-window
3422      icicle-bookmark-file-this-dir-some-tags-other-window
3423      (fboundp 'bmkp-file-this-dir-some-tags-jump)) ; `C-x 4 j t C-f +'
3424     (bmkp-file-this-dir-some-tags-regexp-jump
3425      icicle-bookmark-file-this-dir-some-tags-regexp
3426      (fboundp 'bmkp-file-this-dir-some-tags-regexp-jump)) ; `C-x j t % C-f +'
3427     (bmkp-file-this-dir-some-tags-regexp-jump-other-window
3428      icicle-bookmark-file-this-dir-some-tags-regexp-other-window
3429      (fboundp 'bmkp-file-this-dir-some-tags-regexp-jump)) ; `C-x 4 j t % C-f +'
3430     (bmkp-url-jump icicle-bookmark-url (fboundp 'bmkp-url-jump)) ; `C-x j u'
3431     (bmkp-url-jump-other-window icicle-bookmark-url-other-window (fboundp 'bmkp-url-jump)) ; `C-x 4 j u'
3432     (bmkp-w3m-jump icicle-bookmark-w3m (fboundp 'bmkp-w3m-jump)) ; `C-x j w'
3433     (bmkp-w3m-jump-other-window icicle-bookmark-w3m-other-window (fboundp 'bmkp-w3m-jump)) ; `C-x 4 j w'
3434
3435     ;; Don't let Emacs 20 or 21 use `substitute-key-definition' on `M-.' or `M-*', since we need
3436     ;; these keys for the minibuffer.  Leave them unbound in `icicle-mode-map' until Emacs 22+.
3437     (find-tag            icicle-find-tag              (fboundp 'command-remapping)) ; `M-.'
3438     (find-tag-other-window        icicle-find-first-tag-other-window t) ; `C-x 4 .'
3439     (pop-tag-mark        icicle-pop-tag-mark          (fboundp 'command-remapping)) ; `M-*'
3440     (eval-expression     icicle-pp-eval-expression    (fboundp 'command-remapping)) ; `M-:'
3441     (pp-eval-expression icicle-pp-eval-expression (fboundp 'command-remapping)) ;`M-:' (`pp+.el')
3442     ;; For La Carte (`lacarte.el'), not Icicles, but it's convenient to do this here.
3443     (,(kbd "ESC M-x")      lacarte-execute-command ; `ESC M-x'
3444      (fboundp 'lacarte-execute-command))
3445     (,(kbd "M-`")          lacarte-execute-menu-command ; `M-`' - replaces `tmm-menubar'.
3446      (fboundp 'lacarte-execute-menu-command))
3447     (,(kbd "<f10>")        lacarte-execute-menu-command ; `f10' - replaces `menu-bar-open'.
3448      (fboundp 'lacarte-execute-menu-command)))
3449   "*List of top-level commands to bind in Icicle mode.
3450 Each list element is of custom type `icicle-key-definition' and has
3451 the form (KEY COMMAND CONDITION).
3452
3453 KEY is either a key sequence (string or vector) to bind COMMAND to or
3454 a command to remap to COMMAND.
3455 COMMAND is bound according to the value of KEY, unless the result of
3456 evaluating CONDITION is nil.
3457
3458 In Customize, to specify a key sequence, choose `Key' in the `Value
3459 Menu', then enter a key description such as that returned by `C-h k'.
3460 For convenience, you can use insert each key in the key description by
3461 hitting `C-q' then the key.  For example, to enter the key description
3462 `C-c M-k' you can use `C-q C-c C-q M-k'.
3463
3464 If you customize this option, then you must exit and re-enter Icicle
3465 mode to ensure that the change takes effect.  This is really necessary
3466 only if your changes would undefine a key.
3467
3468 For this option to have an effect upon startup, it must be set before
3469 you enter Icicle mode.  This means that you must ensure that the code
3470 that sets it is invoked before you enter Icicle mode.  If you use
3471 Customize to change this option, then ensure that the code inserted by
3472 Customize into your `user-init-file' or your `custom-file' is invoked
3473 before you enter Icicle mode."
3474   :type (if (> emacs-major-version 20)
3475             '(repeat icicle-key-definition)
3476           '(repeat
3477             (list
3478              (choice
3479               (restricted-sexp :tag "Key"
3480                :match-alternatives ((lambda (x) (or (stringp x) (vectorp x))))
3481                :value [ignore])
3482               (restricted-sexp :tag "Command to remap"
3483                ;; Use `symbolp' instead of `commandp', in case the library defining the
3484                ;; command is not loaded.
3485                :match-alternatives (symbolp) :value ignore))
3486              ;; Use `symbolp' instead of `commandp'...
3487              (restricted-sexp :tag "Command"
3488               :match-alternatives (symbolp) :value ignore)
3489              (sexp :tag "Condition"))))
3490   :set #'(lambda (sym defs)
3491            (custom-set-default sym defs)
3492            (when (boundp 'icicle-mode-map) ; Avoid error on initialization.
3493              (icicle-bind-top-level-commands defs)))
3494   :initialize #'custom-initialize-default
3495   :group 'Icicles-Key-Bindings)
3496
3497 ;;;###autoload
3498 (defcustom icicle-top-level-when-sole-completion-delay 0.7
3499   "*Number of secs to wait to return to top level if only one completion.
3500 This has no effect if `icicle-top-level-when-sole-completion-flag' is
3501 nil.  Editing the completion (typing or deleting a character) before
3502 the delay expires prevents its automatic acceptance.
3503
3504 Do not set this to 0.0.  Set it to slightly more than zero if you want
3505 instant action."
3506   :type 'number :group 'Icicles-Matching)
3507
3508 ;;;###autoload
3509 (defcustom icicle-top-level-when-sole-completion-flag nil
3510   "*Non-nil means to return to top level if only one matching completion.
3511 The sole completion is accepted."
3512   :type 'boolean :group 'Icicles-Matching)
3513
3514 ;;;###autoload
3515 (defcustom icicle-touche-pas-aux-menus-flag nil
3516   "*Non-nil means do not add items to menus except Minibuf and Icicles.
3517 This value is used only when Icicles mode is initially established, so
3518 changing this has no effect after Icicles has been loaded.  However,
3519 you can change it and save the new value so it will be used next time.
3520
3521 For this option to have an effect upon startup, it must be set before
3522 you enter Icicle mode.  This means that you must ensure that the code
3523 that sets it is invoked before you enter Icicle mode.  If you use
3524 Customize to change this option, then ensure that the code inserted by
3525 Customize into your `user-init-file' or your `custom-file' is invoked
3526 before you enter Icicle mode."
3527   :type 'boolean :group 'Icicles-Key-Bindings)
3528
3529 ;;;###autoload
3530 (defcustom icicle-transform-function nil ; Toggle with `C-$,'.
3531   "*Function used to transform the list of completion candidates.
3532 This is applied to the list of initial candidates.
3533 If this is nil, then no transformation takes place.
3534
3535 You can toggle this option at any time from the minibuffer using
3536 `C-$,'.
3537
3538 NOTE: Although this is a user option, you probably do *NOT* want to
3539 customize it.  Icicles commands already \"do the right thing\" when it
3540 comes to candidate transformation.  The value of this option may be
3541 changed by program locally, for use in particular contexts.  For
3542 example, when you use `C-c C-`' (\ `icicle-search-generic') in a
3543 *shell* buffer, Icicles uses this variable with a value of
3544 `icicle-remove-duplicates', to remove duplicate shell commands from
3545 your input history list.
3546
3547 Emacs-Lisp programmers can use this variable to transform the list of
3548 candidates in any way they like.  A typical use is to remove
3549 duplicates, by binding it to `icicle-remove-duplicates' or
3550 `icicle-remove-dups-if-extras'."
3551   :type '(choice (const :tag "None" nil) function) :group 'Icicles-Completions-Display)
3552
3553 ;;;###autoload
3554 (defcustom icicle-type-actions-alist
3555   '(("buffer"
3556      (lambda (b) (with-current-buffer b (ps-print-buffer))) ; E.g. showing you can use lambda.
3557      1-window-frames-on  another-buffer  browse-url-of-buffer  buffer-disable-undo
3558      buffer-enable-undo  buffer-file-name  buffer-local-variables  buffer-modified-p
3559      buffer-name  buffer-size  bury-buffer  choose-grep-buffer  current-line-string
3560      delete-1-window-frames-on  delete-windows-for  delete-windows-on
3561      delete/iconify-windows-on  describe-buffer-bindings  diff-buffer-with-file
3562      display-buffer  display-buffer-other-frame  echo-in-buffer  eval-buffer  fontify-buffer
3563      generate-new-buffer  get-buffer  get-buffer-process  get-buffer-window
3564      get-buffer-window-list  grepp-choose-grep-buffer  ibuffer-jump-to-buffer
3565      icicle-char-properties-in-buffer  icicle-delete-window  icicle-delete-windows-on
3566      icicle-help-line-buffer  icicle-kill-a-buffer  insert-buffer  insert-buffer-substring
3567      insert-buffer-substring-as-yank  insert-buffer-substring-no-properties  kill-buffer
3568      kill-buffer-and-its-windows  kill-buffer-if-not-modified  last-buffer
3569      multi-window-frames-on  other-buffer  pop-to-buffer  pr-interface  remove-windows-on
3570      replace-buffer-in-windows  smiley-buffer  switch-to-buffer  switch-to-buffer-other-frame
3571      switch-to-buffer-other-window  view-buffer  view-buffer-other-frame
3572      view-buffer-other-window)
3573     ("color"
3574      color-defined-p  color-gray-p  color-supported-p  color-values  colors
3575      doremi-set-background-color  doremi-set-foreground-color  eyedrop-color-message
3576      facemenu-set-background  facemenu-set-foreground  hexrgb-blue  hexrgb-color-name-to-hex
3577      hexrgb-complement  hexrgb-green  hexrgb-hex-to-color-values  hexrgb-hue  hexrgb-red
3578      hexrgb-saturation  hexrgb-value  icicle-color-help icicle-color-name-w-bg
3579      palette-brightness-scale  palette-color-message  palette-complement-or-alternative
3580      palette-hex-info  palette-hsv-info  palette-rgb-info  palette-swatch  ps-e-color-values
3581      ps-e-x-color-values  set-background-color  set-border-color  set-cursor-color
3582      set-foreground-color  set-mouse-color  tty-color-canonicalize  tty-color-desc
3583      tty-color-standard-values  tty-color-translate  tty-color-values  x-color-defined-p
3584      x-color-values)
3585     ("command"
3586      command-remapping  define-prefix-command  describe-command  disable-command
3587      doremi-push-frame-config-for-command  enable-command  Info-find-emacs-command-nodes
3588      Info-goto-emacs-command-node)
3589     ("face"
3590      color-theme-spec  custom-facep  customize-face  customize-face-other-window
3591      custom-theme-recalc-face  describe-face  face-all-attributes  face-attr-construct
3592      face-background  face-background-20+  face-background-pixmap  face-bold-p
3593      face-default-spec  face-differs-from-default-p  face-doc-string  face-documentation
3594      face-font  face-foreground  face-foreground-20+  face-id  face-inverse-video-p
3595      face-italic-p  face-nontrivial-p  face-spec-reset-face  face-stipple  face-underline-p
3596      face-user-default-spec  facemenu-add-face facemenu-add-new-face  facemenu-set-face
3597      find-face-definition  hlt-choose-default-face  hlt-show-default-face
3598      hlt-unhighlight-region-for-face  icicle-customize-face
3599      icicle-customize-face-other-window  invert-face  make-face  make-face-bold
3600      make-face-bold-italic  make-face-italic  make-face-unbold  make-face-unitalic
3601      moccur-face-check  modify-face  ps-face-attributes  read-all-face-attributes
3602      read-face-font)
3603     ("file"
3604      abbreviate-file-name  ange-ftp-chase-symlinks  ange-ftp-file-modtime  apropos-library  
3605      auto-coding-alist-lookup  bookmark-file-or-variation-thereof  bookmark-load
3606      browse-url-of-file  byte-compile-file  check-declare-file  comint-append-output-to-file
3607      comint-quote-filename  comint-substitute-in-file-name  comint-unquote-filename
3608      comint-write-output  compilation-get-file-structure  cookie-insert  create-file-buffer
3609      delete-file  describe-file  dired-delete-file  diredp-mouse-diff  dired-show-file-type
3610      dir-locals-find-file  dir-locals-read-from-file  do-after-load-evaluation  ebnf-eps-file
3611      ebnf-print-file  ebnf-spool-file  ebnf-syntax-file  ediff-backup  epa-decrypt-file
3612      epa-import-keys  epa-verify-file  eval-next-after-load  ffap-file-remote-p
3613      ffap-locate-file  file-attributes  file-cache-add-file  file-chase-links
3614      file-dependents  file-directory-p  file-executable-p  file-exists-p
3615      file-loadhist-lookup  file-local-copy  file-modes  file-name-nondirectory
3616      file-newest-backup  file-nlinks  file-ownership-preserved-p  file-provides
3617      file-readable-p  file-regular-p  file-relative-name  file-remote-p  file-requires
3618      file-symlink-p  file-system-info  file-truename  file-writable-p  find-alternate-file
3619      find-alternate-file-other-window  find-buffer-visiting  finder-commentary  find-file
3620      find-file-at-point  find-file-binary  find-file-literally  find-file-noselect
3621      find-file-other-frame  find-file-other-window find-file-read-only
3622      find-file-read-only-other-frame  find-file-read-only-other-window  find-file-text
3623      get-file-buffer  gnus-audio-play  gnus-convert-png-to-face  hexl-find-file
3624      highlight-compare-with-file   icicle-add-file-to-fileset
3625      icicle-delete-file-or-directory  icicle-describe-file  icicle-file-remote-p
3626      icicle-help-line-file  icicle-search-file  icicle-shell-command-on-file
3627      image-type-from-file-header  image-type-from-file-name  Info-find-file  Info-index-nodes
3628      info-lookup-file  Info-toc-nodes  info-xref-check  insert-file  insert-file-literally
3629      insert-image-file  list-tags  lm-commentary  lm-creation-date  lm-keywords  lm-keywords-list
3630      lm-last-modified-date  lm-summary  lm-synopsis  lm-verify  lm-version  load  load-file
3631      load-history-regexp  make-backup-file-name  move-file-to-trash  open-dribble-file
3632      open-termscript  play-sound-file  pr-ps-file-preview  pr-ps-file-print
3633      pr-ps-file-ps-print  pr-ps-file-using-ghostscript  recentf-add-file  recentf-push
3634      recentf-remove-if-non-kept  recover-file  rmail-input  rmail-output  set-file-times
3635      set-visited-file-name  substitute-in-file-name  system-move-file-to-trash
3636      untranslated-canonical-name  untranslated-file-p  url-basepath  vc-backend  
3637      vc-delete-automatic-version-backups  vc-file-clearprops  vc-insert-file
3638      vc-make-version-backup  vc-name  vc-state  vc-working-revision  view-file
3639      view-file-other-frame  view-file-other-window  visit-tags-table  w32-browser
3640      w32-long-file-name  w32-short-file-name  w32explore  woman-find-file  write-file
3641      xml-parse-file)
3642     ("frame"
3643      current-window-configuration  delete-frame  delete-other-frames  thumfr-dethumbify-frame
3644      doremi-undo-last-frame-color-change  thumfr-fisheye  fit-frame  fit-frame-maximize-frame
3645      fit-frame-minimize-frame  fit-frame-restore-frame  frame-char-height  frame-char-width
3646      frame-current-scroll-bars  frame-extra-pixels-height  frame-extra-pixels-width
3647      frame-face-alist  frame-first-window  frame-focus  frame-height  frame-iconified-p
3648      frame-parameters  frame-pixel-height  frame-pixel-width frame-root-window
3649      frame-selected-window  frame-set-background-mode  frame-terminal
3650      frame-visible-p  frame-width  get-a-frame  get-frame-name
3651      hide-frame  icicle-select-frame-by-name  iconify-frame  lower-frame
3652      make-frame-invisible  make-frame-visible  maximize-frame  maximize-frame-horizontally
3653      maximize-frame-vertically  menu-bar-open  minimize-frame  next-frame
3654      thumfr-only-raise-frame  previous-frame  raise-frame  really-iconify-frame
3655      redirect-frame-focus  redraw-frame  restore-frame  restore-frame-horizontally
3656      restore-frame-vertically  select-frame   select-frame-set-input-focus  set-frame-name
3657      show-frame  thumfr-thumbify-frame  thumfr-thumbify-other-frames  thumfr-thumbnail-frame-p
3658      thumfr-toggle-thumbnail-frame  toggle-max-frame  toggle-max-frame-horizontally
3659      toggle-max-frame-vertically  toggle-zoom-frame  tty-color-alist  tty-color-clear
3660      w32-focus-frame  window-list  window-system  window-tree  x-focus-frame  zoom-frm-in
3661      zoom-frm-out  zoom-frm-unzoom)
3662     ("function"
3663      cancel-function-timers  describe-function  elp-instrument-function  find-function
3664      find-function-other-frame  find-function-other-window  symbol-function  trace-function
3665      trace-function-background)
3666     ("option" custom-note-var-changed  customize-option  customize-option-other-window
3667      describe-option  icicle-binary-option-p  tell-customize-var-has-changed)
3668     ("process"
3669      accept-process-output  anything-kill-async-process  clone-process  continue-process
3670      delete-process  get-process  interrupt-process  kill-process  process-buffer
3671      process-coding-system  process-command  process-contact  process-exit-status
3672      process-filter  process-filter-multibyte-p  process-id
3673      process-inherit-coding-system-flag  process-kill-without-query  process-mark
3674      process-name  process-plist  process-query-on-exit-flag  process-running-child-p
3675      process-send-eof  process-sentinel  process-status  process-tty-name  process-type
3676      quit-process  set-process-coding-system  stop-process  tooltip-process-prompt-regexp
3677      tq-create)
3678     ("symbol"
3679      apropos-describe-plist  apropos-macrop  apropos-score-symbol  byte-compile-const-symbol-p
3680      custom-guess-type  custom-unlispify-tag-name  custom-variable-type  default-boundp
3681      default-value  describe-minor-mode-from-symbol  fmakunbound
3682      icicle-help-on-candidate-symbol  info-lookup-symbol  makunbound  symbol-file
3683      symbol-function  symbol-plist  symbol-value)
3684     ("variable"
3685      custom-type  custom-variable-documentation  custom-variable-p  custom-variable-type
3686      describe-variable  find-variable  find-variable-noselect  find-variable-other-frame
3687      find-variable-other-window  help-custom-type  icicle-custom-type  kill-local-variable
3688      local-variable-if-set-p  local-variable-p  make-local-variable  make-variable-buffer-local
3689      make-variable-frame-local  symbol-value  user-variable-p  variable-binding-locus)
3690     ("window"
3691      balance-windows  browse-kill-ring-fit-window  compilation-set-window-height
3692      delete-other-windows  delete-other-windows-vertically  delete-window
3693      delete/iconify-window  fit-frame-max-window-size  fit-window-to-buffer
3694      mouse-drag-vertical-line-rightward-window  mouse-drag-window-above  next-window
3695      previous-window  remove-window  select-window  shrink-window-if-larger-than-buffer
3696      split-window  truncated-partial-width-window-p  window--display-buffer-1
3697      window--even-window-heights  window--try-to-split-window  window-body-height
3698      window-buffer  window-buffer-height  window-current-scroll-bars  window-dedicated-p
3699      window-display-table  window-edges  window-end  window-fixed-size-p  window-frame
3700      window-fringes  window-full-width-p  window-height  window-hscroll  window-inside-edges
3701      window-inside-pixel-edges  window-margins  window-minibuffer-p  window-parameters
3702      window-pixel-edges  window-point  window-safely-shrinkable-p  window-scroll-bars
3703      window-start  window-text-height  window-vscroll  window-width))
3704   "*Alist of Emacs object types and associated actions.
3705 Each element has the form (TYPE FUNCTION...), where TYPE names an
3706 object type, and each FUNCTION accepts an object of type TYPE as its
3707 only required argument
3708
3709 A FUNCTION here can be a symbol or a lambda form.  You can use a
3710 symbol that is not yet `fboundp', that is, one that does not yet have
3711 a function definition.  Any symbols that do not have function
3712 definitions when this option is used are simply filtered out.
3713
3714 However, just because a function is defined at runtime does not mean
3715 that it will work.  For example, function `buffer-size' is included in
3716 the default value for type `buffer', but in Emacs 20 `buffer-size'
3717 accepts no arguments, so applying it to a buffer name raises an error.
3718
3719 \[Note: If you have suggestions or corrections for the default value,
3720 send them in, using `\\[icicle-send-bug-report]'.  The initial list
3721 was drawn up quickly by looking at functions with the type in their
3722 name and that accept a value of that type as only required argument.
3723 There is no doubt that the default value could be improved.]"
3724   :type '(alist
3725           :key-type   (string :tag "Object type")
3726           ;; We cannot use type `function' because some symbols might not yet be `fboundp'.
3727           :value-type (repeat (restricted-sexp :tag "Action (function)"
3728                                :match-alternatives (functionp symbolp))))
3729   :group 'Icicles-Miscellaneous)
3730
3731 ;;;###autoload
3732 (defcustom icicle-unpropertize-completion-result-flag nil
3733   "*Non-nil means strip text properties from the completion result.
3734 Set this option to non-nil only if you need to ensure, for some other
3735 library, that the string returned by `completing-read' and (starting
3736 with Emacs 23) `read-file-name' has no text properties.
3737
3738 Typically, you will not use a non-nil value.  Internal text properties
3739 added by Icicles are always removed anyway.  A non-nil value lets you
3740 also remove properties such as `face'."
3741   :type 'boolean :group 'Icicles-Miscellaneous)
3742
3743 ;;;###autoload
3744 (defcustom icicle-update-input-hook nil
3745   "*Functions run when minibuffer input is updated (typing or deleting)."
3746   :type 'hook :group 'Icicles-Miscellaneous)
3747
3748 ;;;###autoload
3749 (defcustom icicle-use-~-for-home-dir-flag t ; Toggle with `M-~'.
3750   "*Non-nil means abbreviate your home directory using `~'.
3751 You can toggle this option from the minibuffer at any time using
3752 `M-~'."
3753   :type 'boolean :group 'Icicles-Key-Bindings)
3754
3755 ;;;###autoload
3756 (defcustom icicle-use-C-for-actions-flag t ; Toggle with `M-g'.
3757   "*Non-nil means use modifier `C-' (Control) for multi-command actions.
3758 If nil, then you need no `C-' modifier for actions, and, instead, you
3759 need a `C-' modifier for ordinary candidate cycling.
3760
3761 It is not strictly correct to speak in terms of the `C-' modifier -
3762 that is only the default behavior.  The actual keys concerned are
3763 those defined by these options:
3764
3765  `icicle-modal-cycle-down-action-keys'
3766  `icicle-modal-cycle-up-action-keys'
3767  `icicle-apropos-cycle-next-action-keys'
3768  `icicle-apropos-cycle-previous-action-keys'
3769  `icicle-prefix-cycle-next-action-keys'
3770  `icicle-prefix-cycle-previous-action-keys'
3771
3772 You can toggle this option from the minibuffer at any time using
3773 `M-g'."
3774   :type 'boolean :group 'Icicles-Key-Bindings)
3775
3776 ;;;###autoload
3777 (defcustom icicle-use-anything-candidates-flag t
3778   "*Non-nil means Icicles can include Anything candidates for completion.
3779 When non-nil, Anything actions are used for candidate alternate
3780 actions in some Icicles commands, and Anything types and actions are
3781 used by command `icicle-object-action' (aka `a' and `what-which-how').
3782
3783 This option has no effect if library `anything.el' cannot be loaded."
3784   :type 'boolean :group 'Icicles-Matching)
3785
3786 ;;;###autoload
3787 (defcustom icicle-use-candidates-only-once-flag nil
3788   "*Non-nil means remove each candidate from the set after using it.
3789 When you use a multi-command and act on a candidate (for example, with
3790 `C-RET'), the candidate is removed from those available if this is
3791 non-nil.  If this is nil, then the candidate is not removed, so you
3792 can act on it again.
3793
3794 You can customize this option if you prefer the non-nil behavior all
3795 of the time.  However, most users will not want to do that.
3796
3797 If you write Emacs-Lisp code, you can bind this to non-nil during
3798 completion in contexts where it makes little sense for users to act on
3799 the same candidate more than once.  That way, users cannot choose it
3800 again, and they are not distracted seeing it as a candidate.
3801
3802 See also non-option variable `icicle-use-candidates-only-once-alt-p'."
3803   :type 'boolean :group 'Icicles-Matching)
3804
3805 ;;;###autoload
3806 (defcustom icicle-word-completion-keys '([(meta ?\ )]) ; `M-SPC'
3807   "*Key sequences to use for minibuffer prefix word completion.
3808 A list of values that each has the same form as a key-sequence
3809 argument to `define-key'.  It is a list mainly in order to accommodate
3810 different keyboards.
3811
3812 Because file names, in particular, can contain spaces, some people
3813 prefer such a key sequence to be non-printable, such as `M-SPC'.  This
3814 is the default value in Icicles.
3815
3816 But because the spacebar is such a convenient key to hit, other people
3817 prefer to use `SPC' for word completion, and to insert a space some
3818 other way.  The usual way to do that is via `C-q SPC', but command
3819 `icicle-insert-a-space' is provided for convenience.  You can bind
3820 this to `M-SPC', for instance, in `minibuffer-local-completion-map',
3821 `minibuffer-local-completion-map', and
3822 `minibuffer-local-must-match-map'."
3823   :type '(repeat sexp) :group 'Icicles-Key-Bindings)
3824
3825 ;;;###autoload
3826 (defcustom icicle-WYSIWYG-Completions-flag "MMMM"
3827   "*Non-nil means show candidates in `*Completions*' using WYSIWYG.
3828 This has an effect only for completion of faces and colors.
3829
3830 The particular non-nil value determines the appearance:
3831 * If t, the candidate is shown with its text properties.
3832 * If a string, the string is propertized and then appended to the
3833   candidate,  to serve as a color swatch.
3834
3835 Some commands might override a string value with different text.  This
3836 is the case for `icicle-read-color', for instance: the color swatch
3837 text is always the color's RGB code.
3838
3839 Note that, starting with Emacs 22, if this option is non-nil, then
3840 command `describe-face' does not use `completing-read-multiple', since
3841 that (non-Icicles) function does not support WYSIWYG candidates."
3842   :type '(choice
3843           (string :tag "Show candidate plus a WYSIWYG swatch with text..."  :value "MMMM")
3844           (const  :tag "Show candidate itself using WYSIWYG"                t)
3845           (const  :tag "Show candidate as is, with no text properties"      nil))
3846   :group 'Icicles-Completions-Display)
3847
3848 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3849
3850 (provide 'icicles-opt)
3851
3852 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3853 ;;; icicles-opt.el ends here