(icomplete-compute-delay): Fix docstring and remove spurious *.
(icomplete-delay-completions-threshold): Fix typo in docstring and
remove spurious *.
+ (icomplete-completions): While collecting the list of prospective
+ candidates, don't overshoot `icomplete-prospects-length'.
2008-03-20 Dan Nicolaescu <dann@ics.uci.edu>
(substring most (length name))
close-bracket-determined)))
;;"-prospects" - more than one candidate
- (prospects-len 0)
- prospects most-is-exact comp)
+ (prospects-len (+ (length determ) 6)) ;; take {,...} into account
+ prospects most-is-exact comp limit)
(if (eq most-try t)
(setq prospects nil)
- (while (and comps (< prospects-len icomplete-prospects-length))
+ (while (and comps (not limit))
(setq comp (substring (car comps) most-len)
comps (cdr comps))
(cond ((string-equal comp "") (setq most-is-exact t))
((member comp prospects))
- (t (setq prospects (cons comp prospects)
- prospects-len (+ (length comp) 1 prospects-len))))))
+ (t (setq prospects-len (+ (length comp) 1 prospects-len))
+ (if (< prospects-len icomplete-prospects-length)
+ (setq prospects (cons comp prospects))
+ (setq limit t))))))
(if prospects
(concat determ
"{"