aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJuanma Barranquero2008-03-20 10:28:55 +0000
committerJuanma Barranquero2008-03-20 10:28:55 +0000
commit7d94fb17ea95a5d62135d0be38ec70d5a922f586 (patch)
tree6ba8c6576557c526400cd50d55391bf785403483 /lisp
parent077aec278846386a3c67f8110aa4d0c0754751e8 (diff)
downloademacs-7d94fb17ea95a5d62135d0be38ec70d5a922f586.tar.gz
emacs-7d94fb17ea95a5d62135d0be38ec70d5a922f586.zip
(icomplete-completions): While collecting the list of prospective candidates,
don't overshoot `icomplete-prospects-length'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/icomplete.el12
2 files changed, 9 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a812405fd1a..75dbbd5a068 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -6,6 +6,8 @@
6 (icomplete-compute-delay): Fix docstring and remove spurious *. 6 (icomplete-compute-delay): Fix docstring and remove spurious *.
7 (icomplete-delay-completions-threshold): Fix typo in docstring and 7 (icomplete-delay-completions-threshold): Fix typo in docstring and
8 remove spurious *. 8 remove spurious *.
9 (icomplete-completions): While collecting the list of prospective
10 candidates, don't overshoot `icomplete-prospects-length'.
9 11
102008-03-20 Dan Nicolaescu <dann@ics.uci.edu> 122008-03-20 Dan Nicolaescu <dann@ics.uci.edu>
11 13
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 780fca20709..ce35a6c960d 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -299,17 +299,19 @@ are exhibited within the square braces.)"
299 (substring most (length name)) 299 (substring most (length name))
300 close-bracket-determined))) 300 close-bracket-determined)))
301 ;;"-prospects" - more than one candidate 301 ;;"-prospects" - more than one candidate
302 (prospects-len 0) 302 (prospects-len (+ (length determ) 6)) ;; take {,...} into account
303 prospects most-is-exact comp) 303 prospects most-is-exact comp limit)
304 (if (eq most-try t) 304 (if (eq most-try t)
305 (setq prospects nil) 305 (setq prospects nil)
306 (while (and comps (< prospects-len icomplete-prospects-length)) 306 (while (and comps (not limit))
307 (setq comp (substring (car comps) most-len) 307 (setq comp (substring (car comps) most-len)
308 comps (cdr comps)) 308 comps (cdr comps))
309 (cond ((string-equal comp "") (setq most-is-exact t)) 309 (cond ((string-equal comp "") (setq most-is-exact t))
310 ((member comp prospects)) 310 ((member comp prospects))
311 (t (setq prospects (cons comp prospects) 311 (t (setq prospects-len (+ (length comp) 1 prospects-len))
312 prospects-len (+ (length comp) 1 prospects-len)))))) 312 (if (< prospects-len icomplete-prospects-length)
313 (setq prospects (cons comp prospects))
314 (setq limit t))))))
313 (if prospects 315 (if prospects
314 (concat determ 316 (concat determ
315 "{" 317 "{"