+2013-12-24 Daniel Colascione <dancol@dancol.org>
+
+ * icomplete.el: Remove redundant :group arguments to `defcustom'
+ throughout.
+ (icomplete-show-matches-on-no-input): New customizable variable.
+ (icomplete-minibuffer-setup): Call `icomplete-exhibit' on setup if
+ we have something to show.
+ (icomplete-exhibit): Compute completions even if we have no user
+ input.
+
2013-12-23 Daniel Colascione <dancol@dancol.org>
* icomplete.el: Move `provide' to end of file.
"When non-nil, hide common prefix from completion candidates.
When nil, show candidates in full."
:type 'boolean
- :version "24.4"
- :group 'icomplete)
+ :version "24.4")
+
+(defcustom icomplete-show-matches-on-no-input t
+ "When non-nil, show completions when first prompting for input."
+ :type 'boolean
+ :version "24.4")
(defface icomplete-first-match '((t :weight bold))
"Face used by icomplete for highlighting first match."
- :version "24.4"
- :group 'icomplete)
+ :version "24.4")
;;;_* User Customization variables
(defcustom icomplete-prospects-height
(+ 1 (/ (+ icomplete-prospects-length 20) (window-width)))
"Maximum number of lines to use in the minibuffer."
:type 'integer
- :group 'icomplete
:version "23.1")
(defcustom icomplete-compute-delay .3
"Completions-computation stall, used only with large-number completions.
See `icomplete-delay-completions-threshold'."
- :type 'number
- :group 'icomplete)
+ :type 'number)
(defcustom icomplete-delay-completions-threshold 400
"Pending-completions number over which to apply `icomplete-compute-delay'."
- :type 'integer
- :group 'icomplete)
+ :type 'integer)
(defcustom icomplete-max-delay-chars 3
"Maximum number of initial chars to apply icomplete compute delay."
- :type 'integer
- :group 'icomplete)
+ :type 'integer)
(defvar icomplete-in-buffer nil
"If non-nil, also use Icomplete when completing in non-mini buffers.")
(current-local-map)))
(add-hook 'pre-command-hook #'icomplete-pre-command-hook nil t)
(add-hook 'post-command-hook #'icomplete-post-command-hook nil t)
- (run-hooks 'icomplete-minibuffer-setup-hook)))
+ (run-hooks 'icomplete-minibuffer-setup-hook)
+ (when icomplete-show-matches-on-no-input
+ (icomplete-exhibit))))
(defvar icomplete--in-region-buffer nil)
(save-excursion
(goto-char (point-max))
; Insert the match-status information:
- (if (and (> (icomplete--field-end) (icomplete--field-beg))
- buffer-undo-list ; Wait for some user input.
+ (if (and (or icomplete-show-matches-on-no-input
+ (> (icomplete--field-end) (icomplete--field-beg)))
(or
;; Don't bother with delay after certain number of chars:
(> (- (point) (icomplete--field-beg))