;; Description: User options (customizable variables) for Icicles
;; Author: Drew Adams
;; Maintainer: Drew Adams (concat "drew.adams" "@" "oracle" ".com")
-;; Copyright (C) 1996-2014, Drew Adams, all rights reserved.
+;; Copyright (C) 1996-2015, Drew Adams, all rights reserved.
;; Created: Mon Feb 27 09:22:14 2006
-;; Last-Updated: Tue Apr 29 08:44:37 2014 (-0700)
+;; Last-Updated: Wed Jan 14 21:42:00 2015 (-0800)
;; By: dradams
-;; Update #: 5977
+;; Update #: 6096
;; URL: http://www.emacswiki.org/icicles-opt.el
;; Doc URL: http://www.emacswiki.org/Icicles
;; Keywords: internal, extensions, help, abbrev, local, minibuffer,
;; keys, apropos, completion, matching, regexp, command
-;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x, 24.x
+;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x, 24.x, 25.x
;;
;; Features that might be required by this library:
;;
-;; `cl', `cus-theme', `el-swank-fuzzy', `ffap', `ffap-', `fuzzy',
-;; `fuzzy-match', `hexrgb', `kmacro', `levenshtein', `regexp-opt',
-;; `thingatpt', `thingatpt+', `wid-edit', `wid-edit+', `widget'.
+;; `apropos', `apropos+', `avoid', `bookmark', `bookmark+',
+;; `bookmark+-1', `bookmark+-bmu', `bookmark+-key',
+;; `bookmark+-lit', `cl', `cmds-menu', `cus-theme',
+;; `el-swank-fuzzy', `ffap', `ffap-', `fit-frame', `frame-fns',
+;; `fuzzy', `fuzzy-match', `help+20', `hexrgb', `info', `info+20',
+;; `kmacro', `levenshtein', `menu-bar', `menu-bar+', `misc-cmds',
+;; `misc-fns', `naked', `package', `pp', `pp+', `regexp-opt',
+;; `second-sel', `strings', `thingatpt', `thingatpt+', `unaccent',
+;; `w32browser-dlgopen', `wid-edit', `wid-edit+', `widget'.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; `icicle-buffer-skip-functions', `icicle-buffer-sort',
;; `icicle-buffers-ido-like-flag', `icicle-candidate-action-keys',
;; `icicle-candidate-help-keys', `icicle-candidate-width-factor',
+;; `icicle-cand-preds-all', `icicle-cand-preds-for-bookmark',
+;; `icicle-cand-preds-for-buffer', `icicle-cand-preds-for-color',
+;; `icicle-cand-preds-for-face', `icicle-cand-preds-for-file',
+;; `icicle-cand-preds-for-frame', `icicle-cand-preds-for-misc',
+;; `icicle-cand-preds-for-package', `icicle-cand-preds-for-symbol',
+;; `icicle-cand-preds-for-variable',
+;; `icicle-cand-preds-for-window',
;; `icicle-change-region-background-flag',
;; `icicle-change-sort-order-completion',
-;; `icicle-C-l-uses-completion-flag', `icicle-color-themes',
+;; `icicle-C-l-uses-completion-flag',
+;; `icicle-cmpl-include-cdabbrev-flag',
+;; `icicle-cmpl-max-candidates-to-cycle', `icicle-color-themes',
;; `icicle-comint-dynamic-complete-replacements',
;; `icicle-command-abbrev-alist',
;; `icicle-command-abbrev-match-all-parts-flag',
;; `icicle-incremental-completion',
;; `icicle-incremental-completion-delay',
;; `icicle-incremental-completion-threshold',
-;; `icicle-Info-visited-max-candidates',
+;; `icicle-Info-highlight-visited-nodes',
;; `icicle-inhibit-advice-functions', `icicle-inhibit-ding-flag',
;; `icicle-input-string', `icicle-inter-candidates-min-spaces',
;; `icicle-isearch-complete-keys',
;; `icicle-prefix-cycle-previous-alt-action-keys',
;; `icicle-prefix-cycle-previous-help-keys',
;; `icicle-quote-shell-file-name-flag',
+;; `icicle-read-char-by-name-multi-completion-flag' (Emacs 23+),
;; `icicle-read+insert-file-name-keys', `icicle-regexp-quote-flag',
;; `icicle-regexp-search-ring-max', `icicle-region-background',
;; `icicle-require-match-flag', `icicle-saved-completion-sets',
;; Functions defined here:
;;
;; `icicle-bind-top-level-commands',
-;; `icicle-buffer-sort-*...*-last',
+;; `icicle-buffer-sort-*...*-last', `icicle-color-defined-p',
;; `icicle-compute-shell-command-candidates',
-;; `icicle-edmacro-parse-keys', `icicle-image-file-p',
-;; `icicle-kbd', `icicle-remap', `icicle-thing-at-point',
-;; `icicle-widgetp'.
+;; `icicle-edmacro-parse-keys', `icicle-kbd', `icicle-remap',
+;; `icicle-thing-at-point', `icicle-widgetp'.
;;
;; Internal variables defined here:
;;
right thing\".
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Key-Bindings :group 'Icicles-Miscellaneous)
(defcustom icicle-add-proxy-candidates-flag nil ; Toggle with `C-M-_'.
performance reasons.)
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Matching)
(defcustom icicle-alternative-actions-alist ()
This option has no effect if library `anything.el' cannot be loaded.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Completions-Display :group 'Icicles-Matching)
(defcustom icicle-apropos-complete-keys (if (> emacs-major-version 23) ; `S-TAB'
use `S-delete' to delete a candidate bookmark.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Completions-Display :group 'Icicles-Matching)
(defcustom icicle-buffer-candidate-key-bindings
`icicle-default-value'
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Buffers :group 'Icicles-Completions-Display :group 'Icicles-Matching)
(defcustom icicle-candidate-action-keys '([C-return]) ; `C-return'
with Emacs 23) option `icicle-Completions-text-scale-decrease'."
:type 'integer :group 'Icicles-Completions-Display)
+(defcustom icicle-cand-preds-for-bookmark (and (require 'bookmark+ nil t)
+ '("icicle-bookmark-annotated-p"
+ "icicle-bookmark-autofile-p"
+ "icicle-bookmark-autonamed-p"
+ "icicle-bookmark-autonamed-this-buffer-p"
+ "icicle-bookmark-bookmark-file-p"
+ "icicle-bookmark-bookmark-list-p"
+ "icicle-bookmark-desktop-p"
+ "icicle-bookmark-dired-p"
+ "icicle-bookmark-dired-this-dir-p"
+ "icicle-bookmark-dired-wildcards-p"
+ "icicle-bookmark-file-p"
+ "icicle-bookmark-file-this-dir-p"
+ "icicle-bookmark-flagged-p"
+ "icicle-bookmark-function-p"
+ "icicle-bookmark-gnus-p"
+ "icicle-bookmark-icicle-search-hits-p"
+ "icicle-bookmark-image-p"
+ "icicle-bookmark-info-p"
+ ;; "icicle-bookmark-last-specific-buffer-p"
+ ;; "icicle-bookmark-last-specific-file-p"
+ "icicle-bookmark-lighted-p"
+ "icicle-bookmark-local-directory-p"
+ "icicle-bookmark-local-file-p"
+ "icicle-bookmark-man-p"
+ "icicle-bookmark-marked-p"
+ "icicle-bookmark-modified-p"
+ "icicle-bookmark-navlist-p"
+ "icicle-bookmark-non-dir-file-p"
+ "icicle-bookmark-non-file-p"
+ "icicle-bookmark-omitted-p"
+ "icicle-bookmark-orphaned-file-p"
+ "icicle-bookmark-orphaned-local-file-p"
+ "icicle-bookmark-orphaned-remote-file-p"
+ "icicle-bookmark-region-p"
+ "icicle-bookmark-remote-file-p"
+ "icicle-bookmark-sequence-p"
+ "icicle-bookmark-snippet-p"
+ "icicle-bookmark-tagged-p"
+ "icicle-bookmark-temporary-p"
+ "icicle-bookmark-this-buffer-p"
+ ;; "icicle-bookmark-this-file-p"
+ "icicle-bookmark-url-p"
+ "icicle-bookmark-url-browse-p"
+ "icicle-bookmark-variable-list-p"
+ "icicle-bookmark-w3m-p"))
+ "*Predicates for bookmark candidates.
+Useful for `icicle-narrow-candidates-with-predicate'.
+Each value is a string that can be successfully read by `read' and for
+which `read' returns a predicate (Boolean function) that accepts a
+full completion candidate as argument. Typically, the strings are
+predicate names, but they can also be lambda forms.
+
+Depending on the command, the argument to the predicate can take any
+form acceptable as a full completion candidate (alist entry with
+string car, symbol, etc.)
+
+To make these predicates available for narrowing for one of your
+commands, just bind `icicle-bookmark-completing-p' to non-nil in the
+command."
+ :type '(repeat (function :tag "Predicate to keep candidate")) :group 'Icicles-Matching)
+
+(defcustom icicle-cand-preds-for-buffer (append '("icicle-buffer-modified-p"
+ "icicle-compilation-buffer-p"
+ "icicle-special-display-p")
+ (and (fboundp 'icicle-interesting-buffer-p)
+ '("icicle-interesting-buffer-p"))
+ (and (fboundp 'icicle-next-error-buffer-p)
+ '("icicle-next-error-buffer-p")))
+ "*Predicates for buffer candidates.
+Useful for `icicle-narrow-candidates-with-predicate'.
+Each value is a string that can be successfully read by `read' and for
+which `read' returns a predicate (Boolean function) that accepts a
+full completion candidate as argument. Typically, the strings are
+predicate names, but they can also be lambda forms.
+
+Depending on the command, the argument to the predicate can take any
+form acceptable as a full completion candidate (alist entry with
+string car, symbol, etc.)
+
+To make these predicates available for narrowing for one of your
+commands, just bind `icicle-buffer-completing-p' to non-nil in the
+command."
+ :type '(repeat (function :tag "Predicate to keep candidate"))
+ :group 'Icicles-Matching :group 'Icicles-Buffers)
+
+(when (fboundp 'color-defined-p) ; Emacs 22+
+ (defun icicle-color-defined-p (color &optional frame)
+ "Return non-nil if COLOR is supported on frame FRAME.
+COLOR should be a string naming a color (e.g. \"white\"), or a
+string specifying a color's RGB components (e.g. \"#ff12ec\"), or
+the symbol `unspecified'.
+
+If COLOR is a cons with a string car, then the car is used as the
+effective argument. This is so that the function can be used to
+filter completion candidates. The string can be a multi-completion
+whose first part is a color name and whose second part is hex RGB.
+In this case, the second part is tested.
+
+This function returns nil if COLOR is the symbol `unspecified',
+or one of the strings \"unspecified-fg\" or \"unspecified-bg\".
+
+If FRAME is omitted or nil, use the selected frame."
+ (when (consp color) (setq color (car color)))
+ (when icicle-multi-completing-p
+ (let ((icicle-list-use-nth-parts '(2)))
+ (setq color (icicle-transform-multi-completion color))))
+ (and (not (member color '(unspecified "unspecified-bg" "unspecified-fg")))
+ (if (member (framep (or frame (selected-frame))) '(x w32 ns))
+ (xw-color-defined-p color frame)
+ (numberp (tty-color-translate color frame))))))
+
+(defcustom icicle-cand-preds-for-color (and (fboundp 'icicle-color-defined-p)
+ '("icicle-color-defined-p"
+ "icicle-color-gray-p"
+ "icicle-color-supported-p"))
+ "*Predicates for color candidates.
+Useful for `icicle-narrow-candidates-with-predicate'.
+Each value is a string that can be successfully read by `read' and for
+which `read' returns a predicate (Boolean function) that accepts a
+full completion candidate as argument. Typically, the strings are
+predicate names, but they can also be lambda forms.
+
+Depending on the command, the argument to the predicate can take any
+form acceptable as a full completion candidate (alist entry with
+string car, symbol, etc.)
+
+To make these predicates available for narrowing for one of your
+commands, just bind `icicle-color-completing-p' to non-nil in the
+command."
+ :type '(repeat (function :tag "Predicate to keep candidate")) :group 'Icicles-Matching)
+
+(defcustom icicle-cand-preds-for-face '("icicle-face-bold-p"
+ "icicle-face-differs-from-default-p"
+ "icicle-face-inverse-video-p"
+ "icicle-face-italic-p"
+ "icicle-face-nontrivial-p"
+ "icicle-face-underline-p")
+ "*Predicates for face-name candidates.
+Useful for `icicle-narrow-candidates-with-predicate'.
+Each value is a string that can be successfully read by `read' and for
+which `read' returns a predicate (Boolean function) that accepts a
+full completion candidate as argument. Typically, the strings are
+predicate names, but they can also be lambda forms.
+
+Depending on the command, the argument to the predicate can take any
+form acceptable as a full completion candidate (alist entry with
+string car, symbol, etc.)
+
+To make these predicates available for narrowing for one of your
+commands, just bind `icicle-face-completing-p' to non-nil in the
+command."
+ :type '(repeat (function :tag "Predicate to keep candidate")) :group 'Icicles-Matching)
+
+(defcustom icicle-cand-preds-for-file (append '("icicle-file-accessible-directory-p"
+ "icicle-file-compressed-p"
+ "icicle-file-desktop-p"
+ "icicle-file-directory-p"
+ "icicle-file-elc-p"
+ "icicle-file-executable-p"
+ "icicle-file-exists-p"
+ "icicle-file-locked-p"
+ "icicle-file-name-absolute-p"
+ "icicle-file-readable-p"
+ "icicle-file-regular-p"
+ "icicle-file-remote-p"
+ "icicle-file-symlink-p"
+ "icicle-file-writable-p"
+ "icicle-image-file-p"
+ "icicle-looks-like-dir-name-p"
+ "icicle-nondirectory-p")
+ (and (fboundp 'icicle-recentf-include-p)
+ '("icicle-recentf-include-p"
+ "icicle-recentf-keep-p"))
+ (and (fboundp 'icicle-ffap-file-remote-p)
+ '("icicle-ffap-file-remote-p"
+ "icicle-ffap-url-p")))
+ "*Predicates for file-name and directory-name candidates.
+Useful for `icicle-narrow-candidates-with-predicate'.
+Each value is a string that can be successfully read by `read' and for
+which `read' returns a predicate (Boolean function) that accepts a
+full completion candidate as argument. Typically, the strings are
+predicate names, but they can also be lambda forms.
+
+Depending on the command, the argument to the predicate can take any
+form acceptable as a full completion candidate (alist entry with
+string car, symbol, etc.)
+
+To make these predicates available for narrowing for one of your
+commands, just bind `icicle-file-completing-p' to non-nil in the
+command."
+ :type '(repeat (function :tag "Predicate to keep candidate"))
+ :group 'Icicles-Matching :group 'Icicles-Files)
+
+(defcustom icicle-cand-preds-for-frame (append '("icicle-frame-invisible-p"
+ "icicle-frame-splittable-p"
+ "icicle-frame-unsplittable-p")
+ (and (fboundp 'frcmds-frame-iconified-p) ; `frame-cmds.el'
+ '("icicle-frame-iconified-p"))
+ (and (fboundp 'thumfr-thumbnail-frame-p) ; `thumb-frm.el'
+ '("icicle-frame-thumbnail-p")))
+ "*Predicates for frame candidates.
+Useful for `icicle-narrow-candidates-with-predicate'.
+Each value is a string that can be successfully read by `read' and for
+which `read' returns a predicate (Boolean function) that accepts a
+full completion candidate as argument. Typically, the strings are
+predicate names, but they can also be lambda forms.
+
+Depending on the command, the argument to the predicate can take any
+form acceptable as a full completion candidate (alist entry with
+string car, symbol, etc.)
+
+To make these predicates available for narrowing for one of your
+commands, just bind `icicle-frame-completing-p' to non-nil in the
+command."
+ :type '(repeat (function :tag "Predicate to keep candidate")) :group 'Icicles-Matching)
+
+(defcustom icicle-cand-preds-for-misc '("icicle-not-special-candidate-p"
+ "icicle-special-candidate-p")
+ "*Predicates for miscellaneous candidates.
+Useful for `icicle-narrow-candidates-with-predicate'.
+Each value is a string that can be successfully read by `read' and for
+which `read' returns a predicate (Boolean function) that accepts a
+full completion candidate as argument. Typically, the strings are
+predicate names, but they can also be lambda forms.
+
+Depending on the command, the argument to the predicate can take any
+form acceptable as a full completion candidate (alist entry with
+string car, symbol, etc.)"
+ :type '(repeat (function :tag "Predicate to keep candidate")) :group 'Icicles-Matching)
+
+(defcustom icicle-cand-preds-for-package (and (require 'package nil t)
+ '("icicle-package-built-in-p"
+ "icicle-package-disabled-p"
+ "icicle-package-installed-p"))
+ "*Predicates for package candidates.
+Useful for `icicle-narrow-candidates-with-predicate'.
+Each value is a string that can be successfully read by `read' and for
+which `read' returns a predicate (Boolean function) that accepts a
+full completion candidate as argument. Typically, the strings are
+predicate names, but they can also be lambda forms.
+
+Depending on the command, the argument to the predicate can take any
+form acceptable as a full completion candidate (alist entry with
+string car, symbol, etc.)
+
+To make these predicates available for narrowing for one of your
+commands, just bind `icicle-package-completing-p' to non-nil in the
+command."
+ :type '(repeat (function :tag "Predicate to keep candidate")) :group 'Icicles-Matching)
+
+(defcustom icicle-cand-preds-for-symbol '("icicle-binary-option-p"
+ "icicle-defined-thing-p")
+ "*Predicates for symbol-name candidates.
+Useful for `icicle-narrow-candidates-with-predicate'.
+Each value is a string that can be successfully read by `read' and for
+which `read' returns a predicate (Boolean function) that accepts a
+full completion candidate as argument. Typically, the strings are
+predicate names, but they can also be lambda forms.
+
+Depending on the command, the argument to the predicate can take any
+form acceptable as a full completion candidate (alist entry with
+string car, symbol, etc.)
+
+To make these predicates available for narrowing for one of your
+commands, just bind `icicle-symbol-completing-p' to non-nil in the
+command."
+ :type '(repeat (function :tag "Predicate to keep candidate")) :group 'Icicles-Matching)
+
+(defcustom icicle-cand-preds-for-variable (append '("icicle-custom-variable-p")
+ (and (fboundp 'icicle-special-variable-p)
+ '("icicle-special-variable-p")))
+ "*Predicates for variable-name candidates.
+Useful for `icicle-narrow-candidates-with-predicate'.
+Each value is a string that can be successfully read by `read' and for
+which `read' returns a predicate (Boolean function) that accepts a
+full completion candidate as argument. Typically, the strings are
+predicate names, but they can also be lambda forms.
+
+Depending on the command, the argument to the predicate can take any
+form acceptable as a full completion candidate (alist entry with
+string car, symbol, etc.)
+
+To make these predicates available for narrowing for one of your
+commands, just bind `icicle-variable-completing-p' to non-nil in the
+command."
+ :type '(repeat (function :tag "Predicate to keep candidate")) :group 'Icicles-Matching)
+
+(defcustom icicle-cand-preds-for-window (append '("icicle-window-dedicated-p")
+ (and (fboundp 'icicle-window-at-top-p)
+ '("icicle-window-at-bottom-p"
+ "icicle-window-at-left-p"
+ "icicle-window-at-right-p"
+ "icicle-window-at-top-p"
+ "icicle-window-deletable-p"
+ "icicle-window-invisible-p")))
+ "*Predicates for window candidates.
+Useful for `icicle-narrow-candidates-with-predicate'.
+Each value is a string that can be successfully read by `read' and for
+which `read' returns a predicate (Boolean function) that accepts a
+full completion candidate as argument. Typically, the strings are
+predicate names, but they can also be lambda forms.
+
+Depending on the command, the argument to the predicate can take any
+form acceptable as a full completion candidate (alist entry with
+string car, symbol, etc.)
+
+To make these predicates available for narrowing for one of your
+commands, just bind `icicle-window-completing-p' to non-nil in the
+command."
+ :type '(repeat (function :tag "Predicate to keep candidate")) :group 'Icicles-Matching)
+
+;; Must come after all `icicle-cand-preds-for-*' options.
+(defcustom icicle-cand-preds-all (append icicle-cand-preds-for-bookmark
+ icicle-cand-preds-for-buffer
+ icicle-cand-preds-for-color
+ icicle-cand-preds-for-face
+ icicle-cand-preds-for-file
+ icicle-cand-preds-for-frame
+ icicle-cand-preds-for-misc
+ icicle-cand-preds-for-package
+ icicle-cand-preds-for-symbol
+ icicle-cand-preds-for-variable
+ icicle-cand-preds-for-window)
+ "*List of all predicates for completion candidates.
+Useful for `icicle-narrow-candidates-with-predicate'.
+Each value is a string that can be successfully read by `read' and for
+which `read' returns a predicate (Boolean function) that accepts a
+full completion candidate as argument. Typically, the strings are
+predicate names, but they can also be lambda forms.
+
+Depending on the command, the argument to the predicate can take any
+form acceptable as a full completion candidate (alist entry with
+string car, symbol, etc.)"
+ :type '(repeat (function :tag "Predicate To Accept Candidate")) :group 'Icicles-Matching)
+
;; Must be before `icicle-change-region-background-flag'.
(defcustom icicle-mark-position-in-candidate 'input-end
"*Position of mark when you cycle through completion candidates.
delete-selection mode.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Minibuffer-Display)
(defcustom icicle-change-sort-order-completion 7
inputs. You can override the behavior by using `C-u' with `\\[icicle-retrieve-previous-input]'.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Minibuffer-Display :group 'Icicles-Matching)
+(defcustom icicle-cmpl-include-cdabbrev-flag nil
+ "*Non-nil means includes `CDABBREV' candidates for `icicle-complete'.
+This applies only to Icicles minibuffer completion during command
+`icicle-complete', so it applies only when`dynamic-completion-mode' is
+on. That mode is defined in Emacs library `completion.el'.
+
+If nil then Icicles completion for `icicle-complete' includes only
+completions from the completions database. If non-nil then it
+includes also completions found dynamically from the currently
+available windows. These candidates are highlighted using face
+`icicle-special-candidate' so you can distinguish them.
+
+This is the so-called `CDABBREV' completion method defined in
+`completion.el'. It is similar to how `dabbrev' finds candidates but
+with these differences:
+* It is sometimes faster, since it does not use regexps. It searches
+ backwards looking for names that start with the text before point.
+* Case-sensitivity is handled as for other `completion.el' completion.
+
+Remember that you can use multi-command `icicle-toggle-option' anytime
+to toggle the option value."
+ :type 'boolean :group 'Icicles-Matching)
+
+(defcustom icicle-cmpl-max-candidates-to-cycle 7
+ "*Max number of completions to cycle through, or nil for no maximum.
+This has an effect only when `dynamic-completion-mode' is on. That
+mode is defined in Emacs library `completion.el'.
+
+If there are more candidate completions than this for the name prefix
+before point then use Icicles minibuffer completion. Cycling here
+refers to `completions.el' cycling, not to Icicles candidate cycling.
+Thus:
+* A value of zero (0) means to always use Icicles completion.
+* A value of nil means to never automatically use Icicles
+ completion (you can use `C-u C-u' to get Icicles completion)."
+ :type '(choice
+ (restricted-sexp
+ :tag "Use Icicles when there are more completions than this"
+ :match-alternatives ((lambda (x) (and (integerp x) (> x 0)))) :value ignore)
+ (const :tag "No limit - use Icicles only via `C-u C-u'" nil))
+ :group 'Icicles-Miscellaneous)
+
;; Replace this list by your favorite color themes. Each must be the name of a defined function.
;; By default, this includes all color themes defined globally (variable `color-themes').
;;
Otherwise, an abbrev need match only a prefix of the command name.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Matching)
(defcustom icicle-command-abbrev-priority-flag nil
\\[icicle-command-abbrev]'.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Matching)
(defcustom icicle-complete-key-anyway-flag nil
the binding of those keys in `icicle-keymaps-for-key-completion'.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Key-Completion :group 'Icicles-Key-Bindings)
(when (fboundp 'map-keymap) ; Emacs 22+.
(,(icicle-kbd "C-x /") icicle-toggle-expand-directory t) ; `C-x /'
(,(icicle-kbd "C-x C-a") icicle-toggle-annotation t) ; `C-x C-a'
(,(icicle-kbd "C-x C-0") icicle-recomplete-from-original-domain t) ; `C-x C-0'
+ (,(icicle-kbd "C-x C-M-l") icicle-display-candidates-in-Completions t) ; `C-x C-M-l'
(,(icicle-kbd "C-x t") icicle-cycle-image-file-thumbnail ; `C-x t'
(fboundp 'icicle-cycle-image-file-thumbnail))
(,(icicle-kbd "C-x w") icicle-doremi-candidate-width-factor+ ; `C-x w'
;; NO - NEED TO DO THE SWANK PART AT RUNTIME, in icicles-mode.el
(,(icicle-kbd "C-x 2") icicle-doremi-increment-swank-prefix-length+
(and (fboundp 'doremi) (eq (icicle-current-TAB-method) 'swank)))
+ (,(icicle-kbd "C-x C-M->") bmkp-set-icicle-search-hits-bookmark ; `C-x C-M->'
+ (fboundp 'bmkp-set-icicle-search-hits-bookmark))
+ (,(icicle-kbd "C-x C-M-<") bmkp-retrieve-icicle-search-hits ; `C-x C-M-<'
+ (fboundp 'bmkp-set-icicle-search-hits-bookmark))
+ (,(icicle-kbd "C-x C-<") bmkp-retrieve-more-icicle-search-hits ; `C-x C-<'
+ (fboundp 'bmkp-set-icicle-search-hits-bookmark))
;; `minibuffer-completion-help' got wiped out by remap for self-insert.
(,(icicle-kbd "?") icicle-self-insert t) ; `?
(,(icicle-kbd "SPC") icicle-self-insert t) ; " "
`icicle-command-abbrev-alist'.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Minibuffer-Display)
(defcustom icicle-customize-save-variable-function 'customize-save-variable
`icicle-custom-themes' and `icicle-color-themes'.
A prefix argument to `icicle-custom-theme' flips the option value for
-the current invocation of the command."))
+the current invocation of the command."
+ :type 'boolean :group 'Icicles-Miscellaneous))
(defcustom icicle-default-in-prompt-format-function (lambda (default) (format " (%s)" default))
"*Function that formats the default value to include in the prompt.
When it is non-nil and the initial-input argument is nil or \"\", the
default value can be inserted into the minibuffer as the initial
-input. For `completing-read', if the option value is `t' then the
-default value is added the prompt as a hint.
+input.
+
+For `completing-read' and `read-file-name', if the option value is `t'
+then the default value is normally added to the prompt as a hint.
+
+However, for `read-file-name', if `insert-default-directory' is
+non-nil, then to avoid duplication:
+
+* If the default value is the same as `default-directory' it is not
+ added to the prompt.
+
+* If the default value is added to the prompt it is first made
+ relative to `default-directory'.
Adding the default value to the prompt corresponds to the more or less
conventional behavior of vanilla Emacs. But vanilla Emacs does not do
the same name is already defined.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Miscellaneous)
(defcustom icicle-deletion-action-flag t
inhibit `S-delete' object deletion during completion.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Miscellaneous)
(defcustom icicle-dot-show-regexp-flag nil
This has no effect for Emacs versions prior to 21: acts as if non-nil.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Matching :group 'Icicles-Minibuffer-Display)
(defcustom icicle-dot-string "."
This option has no effect for Emacs 20.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean
:group 'Icicles-Files :group 'Icicles-Completions-Display :group 'Icicles-Matching)
and you must load library `filesets.el'.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Matching)
(defcustom icicle-find-file-expand-directory-flag nil
`\\<minibuffer-local-completion-map>\\[icicle-toggle-expand-directory]'."
:type 'boolean :group 'Icicles-Files :group 'Icicles-Miscellaneous)
-(defun icicle-image-file-p (filename)
- "Return non-nil if FILENAME names an image file.
-The regexp value of `image-file-name-regexp' is used for the test.
-Returns nil if library `image-file.el' cannot be loaded, so use this
-only for Emacs 23 and later."
- (and (if (fboundp 'display-graphic-p) (display-graphic-p) window-system)
- (fboundp 'image-file-name-regexp)
- (require 'image-file nil t)
- (icicle-string-match-p (image-file-name-regexp) filename)))
-
-(defcustom icicle-file-skip-functions '(icicle-image-file-p)
+(defcustom icicle-file-skip-functions '(icicle-image-file-p icicle-file-elc-p)
"*Hook run by file-visiting commands on each matching file name.
The value is a list of functions. Each is applied to the file-name
candidate (after transforming it, if it is a multi-completion), until
Note that the file names passed to the hook can be absolute or
relative, depending on the command used.
-Also run by `icicle-buffer' on the names of files that are included
-from the set of recent files or from the Emacs file cache.
+Also run by `icicle-buffer' to exclude filenames in the set of recent
+files or the Emacs file cache from being included as candidates.
This option has no effect for Emacs versions prior to Emacs 23.
bbdb-complete-mail ; For BBDB versions such as 3.02 and later
,@(if (> emacs-major-version 23) '(comint-completion-at-point) '(comint-dynamic-complete))
comint-dynamic-complete-filename comint-replace-by-expanded-filename
+ complete
;; Uncomment `dired-read-shell-command' and `read-shell-command' if you want Icicles completion for
;; shell commands. See http://www.emacswiki.org/Icicles_-_Shell-Command_Enhancements.
ess-complete-object-name gud-gdb-complete-command
Info-goto-node Info-index
Info-menu
- lisp-complete-symbol lisp-completion-at-point
+ lisp-complete-symbol
+ ;; Emacs 25+ uses `elisp-completion-at-point', not `lisp-completion-at-point'.
+ ,@(if (fboundp 'elisp-completion-at-point) '(elisp-completion-at-point) '(lisp-completion-at-point))
minibuffer-default-add-completions
read-char-by-name read-color
read-from-minibuffer read-string
You can toggle this option during completion using `C-x .' (no prefix
arg). You can also use multi-command `icicle-toggle-option' anytime
-to toggle the option.
+to toggle the option value.
See also option `icicle-hide-non-matching-lines-flag'."
:type 'boolean :group 'Icicles-Miscellaneous)
You can toggle this option during completion using `C-u C-x .'. You
can also use multi-command `icicle-toggle-option' anytime to toggle
-the option.
+the option value.
See also option `icicle-hide-common-match-in-Completions-flag'."
:type 'boolean :group 'Icicles-Completions-Display)
You can toggle this option from the minibuffer at any time using
`C-pause'. You can also use multi-command `icicle-toggle-option'
-anytime to toggle the option."
+anytime to toggle the option value."
:type 'boolean :group 'Icicles-Completions-Display)
(defcustom icicle-highlight-input-completion-failure 'implicit-strict
completion failure, then only that highlighting is shown.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Minibuffer-Display)
(defcustom icicle-highlight-lighter-flag t
`Completion Status Indicators' for more information.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Miscellaneous)
(defcustom icicle-highlight-saved-candidates-flag t ; Toggle with `S-pause'.
You can toggle this option from the minibuffer at any time using
`S-pause'. You can also use multi-command `icicle-toggle-option'
-anytime to toggle the option."
+anytime to toggle the option value."
:type 'boolean :group 'Icicles-Completions-Display)
(defcustom icicle-icomplete-mode-max-candidates 30
the effect you might need to invoke the current command again.
You can also use multi-command `icicle-toggle-option' anytime to
-toggle the option."
+toggle the option value."
:type 'boolean :group 'Icicles-Searching)
(defcustom icicle-ignored-directories (and (boundp 'vc-directory-exclusion-list)
:type 'integer :group 'Icicles-Completions-Display)
(when (> emacs-major-version 21)
- (defcustom icicle-Info-visited-max-candidates 10
- "*Max number of Info index-entry candidates for visited highlighting.
-This is used for command `icicle-Info-index'.
-
-If there are more than this many candidates matching your current
-index-topic input, then no attempt is made to higlight specially those
-that refer to nodes you have visited. Otherwise, they are highlighted
-using face `icicle-historical-candidate-other'.
-
-Be aware that this highlighting can be costly, especially for large
-values of the option.
-
-If you use `doremi.el' then you can use multi-command
-`icicle-increment-option' anytime to change the option value
-incrementally.
-
-To turn the highlighting off, set the value to 0 or set option
-`icicle-highlight-historical-candidates-flag' to nil. You can toggle
-that option from the minibuffer anytime using `C-pause'."
- :type 'integer :group 'Icicles-Completions-Display :group 'Icicles-Matching))
+ (defcustom icicle-Info-highlight-visited-nodes nil
+ "When to automatically highlight visited Info node names in `*Completions*'.
+Regardless of the value, on-demand highlighting is always available,
+using `C-x C-M-l'.
+
+Automatic highlighting occurs only if this option value is non-nil and
+the value of option `icicle-highlight-historical-candidates-flag' is
+also non-nil."
+ :type '(choice
+ (const :tag "Always highlight visited candidate Info node names" t)
+ (integer :tag "Max number of candidates for highlighting visited nodes" :value 10)
+ (const :tag "Never highlight visited nodes (highlight on demand only)" nil))
+ :group 'Icicles-Completions-Display))
(defcustom icicle-inhibit-advice-functions
`(choose-completion choose-completion-string completing-read
If nil, Icicles sometimes signals you with a sound.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Miscellaneous)
(defcustom icicle-input-string ".*"
different keyboards - for example, `S-tab' and `S-iso-lefttab'."
:type '(repeat sexp) :group 'Icicles-Key-Completion :group 'Icicles-Key-Bindings)
-(defcustom icicle-key-complete-keys-for-minibuffer '([M-backtab]) ; `M-S-TAB'
+(defcustom icicle-key-complete-keys-for-minibuffer '([M-backtab] [ESC backtab]) ; `M-S-TAB', `ESC S-TAB'
"*Key sequences to use for `icicle-complete-keys' in the minibuffer.
A list of values that each has the same form as a key-sequence
argument to `define-key'.
they never use angle brackets.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Key-Completion :group 'Icicles-Minibuffer-Display)
(defcustom icicle-keymaps-for-key-completion
then on again, for the change to take effect in the same session.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Miscellaneous)
;; Inspired from `icomplete-minibuffer-setup-hook'.
feature).
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Miscellaneous))
(defcustom icicle-pp-eval-expression-print-length nil
information about the characters that, like SPC, lead to quoting.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Miscellaneous)
+(when (fboundp 'read-char-by-name) ; Emacs 23+
+ (defcustom icicle-read-char-by-name-multi-completion-flag t
+ "*Non-nil means `icicle-read-char-by-name' uses multi-completion.
+If nil then a candidate is just as in vanilla Emacs.
+If non-nil then it is a 3-part multi-completion: NAME CODE CHAR,
+showing three ways to represent the character as text:
+
+* NAME is the Unicode name
+* CODE is the Unicode code point, as a hexidecimal numeral
+* CHAR is the char itself (as it appears in text, not as an integer)
+
+In addition, if non-nil then properties `help-echo' and
+`icicle-mode-line-help' are put on NAME, showing both NAME and the
+code point (in hex, octal, and decimal).
+
+Setting this option to nil can speed up reading a character
+considerably, but it does not give you the advantages of seeing the
+character (WYSIWYG) or matching its code point.
+
+Instead of using a nil value, you can also speed things up by:
+* turning off incremental completion
+* choosing a strong input pattern, before asking for candidate
+ matching."
+ :type 'boolean :group 'Icicles-Completions-Display :group 'Icicles-Matching))
+
(defcustom icicle-read+insert-file-name-keys '([(control meta shift ?f)]) ; `C-M-S-f'
"*Key sequences to invoke `icicle-read+insert-file-name'.
A list of values that each has the same form as a key-sequence
You can toggle this option from the minibuffer at any time using
`C-`'. You can also use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Matching)
(defcustom icicle-regexp-search-ring-max (if (boundp 'most-positive-fixnum)
You can toggle this option from the minibuffer during Icicles search
\(e.g., `C-c`') using `C-.'. You can also use multi-command
-`icicle-toggle-option' anytime to toggle the option."
+`icicle-toggle-option' anytime to toggle the option value."
:type 'boolean :group 'Icicles-Searching)
(defcustom icicle-search-from-isearch-keys (if (> emacs-major-version 23) ; `S-TAB'
You can toggle this option from the minibuffer during Icicles search
\(e.g., `C-c`') using `C-^'. You can also use multi-command
-`icicle-toggle-option' anytime to toggle the option."
+`icicle-toggle-option' anytime to toggle the option value."
:type 'boolean :group 'Icicles-Searching)
(defcustom icicle-search-highlight-context-levels-flag t
the entire search regexp.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Searching)
(defcustom icicle-search-highlight-threshold 100000
`icicle-search-replace-common-match-flag' using `M-;'.
Remember that you can also use multi-command `icicle-toggle-option'
-anytime to toggle the option."
+anytime to toggle the option value."
:type 'boolean :group 'Icicles-Searching)
(defcustom icicle-search-replace-literally-flag nil ; Toggle with `C-M-`'.
You can use `C-M-`' to toggle this at any time during Icicles search.
You can also use multi-command `icicle-toggle-option' anytime to
-toggle the option."
+toggle the option value."
:type 'boolean :group 'Icicles-Searching)
(defcustom icicle-search-replace-whole-candidate-flag t ; Toggle with `M-_'.
You can use `\\<minibuffer-local-completion-map>\\[icicle-dispatch-M-_]' to \
toggle this at any time during Icicles search.
You can also use multi-command `icicle-toggle-option' anytime to
-toggle the option."
+toggle the option value."
:type 'boolean :group 'Icicles-Searching)
(defcustom icicle-search-ring-max (if (boundp 'most-positive-fixnum)
You can use `M-q' to toggle this at any time during Icicles search;
the new value takes effect for the next complete search. You can also
use multi-command `icicle-toggle-option' anytime to toggle the
-option."
+option value."
:type 'boolean :group 'Icicles-Searching)
;; Based more or less on `shell-dynamic-complete-as-command'.
You can toggle this option from the minibuffer using `\\<minibuffer-local-completion-map>\
\\[icicle-toggle-annotation]'. You can also use multi-command `icicle-toggle-option'
-anytime to toggle the option."
+anytime to toggle the option value."
:type 'boolean :group 'Icicles-Completions-Display)
(defcustom icicle-show-Completions-help-flag t
Icicle mode.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Completions-Display)
(defcustom icicle-show-Completions-initially-flag nil
input, but not initially.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Completions-Display)
(defcustom icicle-show-multi-completion-flag t
You can toggle this option from the minibuffer using `M-m'. The new
value takes effect after you exit the minibuffer (i.e., for the next
command). You can also use multi-command `icicle-toggle-option'
-anytime to toggle the option."
+anytime to toggle the option value."
:type 'boolean :group 'Icicles-Completions-Display)
;; This is similar to `bmkp-sort-comparer'.
`icicle-prefix-complete-keys', not necessarily `TAB'.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Key-Bindings)
(defcustom icicle-TAB/S-TAB-only-completes-flag nil
You can toggle this option from the minibuffer using `C-^' (except
during Icicles search). You can also use multi-command
-`icicle-toggle-option' anytime to toggle the option."
+`icicle-toggle-option' anytime to toggle the option value."
:initialize (lambda (opt-name val) (set opt-name t))
:set (lambda (opt-name val)
(or (not (require 'tramp nil t)) (prog1 (set opt-name (not val))
([?\C-\M-/] icicle-dispatch-C-M-/ t) ; `C-M-/'
(delete-window icicle-delete-window t) ; `C-x 0'
(delete-windows-for icicle-delete-window t) ; `C-x 0' (`frame-cmds.el')
- (dired icicle-dired t) ; `C-x d'
- (dired-other-window icicle-dired-other-window t) ; `C-x 4 d'
+
+ (describe-package icicle-describe-package ; `C-h P'
+ (fboundp 'describe-package))
+ (dired icicle-dired
+ (not (featurep 'dired+))) ; `C-x d'
+ (dired-other-window icicle-dired-other-window
+ (not (featurep 'dired+))) ; `C-x 4 d'
(exchange-point-and-mark icicle-exchange-point-and-mark t) ; `C-x C-x'
(execute-extended-command icicle-execute-extended-command t) ; `M-x'
(find-file icicle-file t) ; `C-x C-f'
(bmkp-local-file-jump icicle-bookmark-local-file (fboundp 'bmkp-local-file-jump)) ; `C-x j l'
(bmkp-local-file-jump-other-window
icicle-bookmark-local-file-other-window (fboundp 'bmkp-local-file-jump)) ; `C-x 4 j l'
+;;; (bmkp-local-non-dir-file-jump icicle-bookmark-local-non-dir-file
+;;; (fboundp 'bmkp-local-non-dir-file-jump)) ; Not bound
+;;; (bmkp-local-non-dir-file-jump-other-window
+;;; icicle-bookmark-local-non-dir-file-other-window
+;;; (fboundp 'bmkp-local-non-dir-file-jump)) ; Not bound
(bmkp-man-jump icicle-bookmark-man (fboundp 'bmkp-man-jump)) ; `C-x j m'
(bmkp-man-jump-other-window icicle-bookmark-man-other-window (fboundp 'bmkp-man-jump)) ; `C-x 4 j m'
+;;; (bmkp-non-dir-file-jump icicle-bookmark-non-dir-file
+;;; (fboundp 'bmkp-non-dir-file-jump)) ; Not bound
+;;; (bmkp-non-dir-file-jump-other-window icicle-bookmark-non-dir-file-other-window
+;;; (fboundp 'bmkp-non-dir-file-jump)) ; Not bound
(bmkp-non-file-jump icicle-bookmark-non-file (fboundp 'bmkp-non-file-jump)) ; `C-x j b'
(bmkp-non-file-jump-other-window
icicle-bookmark-non-file-other-window (fboundp 'bmkp-non-file-jump)) ; `C-x 4 j b'
(bmkp-remote-file-jump icicle-bookmark-remote-file (fboundp 'bmkp-remote-file-jump)) ; `C-x j n'
(bmkp-remote-file-jump-other-window
icicle-bookmark-remote-file-other-window (fboundp 'bmkp-remote-file-jump)) ; `C-x 4 j n'
+;;; (bmkp-remote-non-dir-file-jump icicle-bookmark-remote-non-dir-file
+;;; (fboundp 'bmkp-remote-non-dir-file-jump)) ; Not bound
+;;; (bmkp-remote-non-dir-file-jump-other-window
+;;; icicle-bookmark-remote-non-dir-file-other-window
+;;; (fboundp 'bmkp-remote-non-dir-file-jump)) ; Not bound
(bmkp-specific-buffers-jump
icicle-bookmark-specific-buffers (fboundp 'bmkp-specific-buffers-jump)) ; `C-x j = b'
(bmkp-specific-buffers-jump-other-window
The sole completion is accepted.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Matching)
(defcustom icicle-touche-pas-aux-menus-flag nil
before you enter Icicle mode.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Key-Bindings)
(defcustom icicle-type-actions-alist
also remove properties such as `face'.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Miscellaneous)
(defcustom icicle-update-input-hook nil
"*Non-nil means abbreviate your home directory using `~'.
You can toggle this option from the minibuffer at any time using
`M-~'. You can also use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Key-Bindings)
(defcustom icicle-use-C-for-actions-flag t ; Toggle with `M-g'.
You can toggle this option from the minibuffer at any time using
`M-g'. You can also use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Key-Bindings)
(defcustom icicle-use-anything-candidates-flag t
This option has no effect if library `anything.el' cannot be loaded.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Matching)
(defcustom icicle-use-candidates-only-once-flag nil
See also non-option variable `icicle-use-candidates-only-once-alt-p'.
Remember that you can use multi-command `icicle-toggle-option' anytime
-to toggle the option."
+to toggle the option value."
:type 'boolean :group 'Icicles-Matching)
(defun icicle-widgetp (widget)
candidate, to serve as a color swatch.
Some commands might override a string value with different text. This
-is the case for `icicle-read-color-wysiwyg', for instance: the color
+is the case for `icicle-read-color-WYSIWYG', for instance: the color
swatch text is always the color's RGB code.
Note that, starting with Emacs 22, if this option is non-nil, then