changeset 95141:17032874a3da

(icomplete-completions): Don't use `predicate' with a table of a different type than `candidates'.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 20 May 2008 13:44:50 +0000
parents 19b17460204b
children f64ddc606a66
files lisp/ChangeLog lisp/icomplete.el
diffstat 2 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue May 20 10:31:44 2008 +0000
+++ b/lisp/ChangeLog	Tue May 20 13:44:50 2008 +0000
@@ -1,3 +1,8 @@
+2008-05-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* icomplete.el (icomplete-completions): Don't use `predicate' with
+	a table of a different type than `candidates'.
+
 2008-05-20  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
 
 	* proced.el (proced-goal-header-re): Renamed from
--- a/lisp/icomplete.el	Tue May 20 10:31:44 2008 +0000
+++ b/lisp/icomplete.el	Tue May 20 13:44:50 2008 +0000
@@ -291,13 +291,14 @@
     ;; `icomplete-prospects-length', there is no need for `catch'/`throw'.
     (if (null comps)
         (format " %sNo matches%s" open-bracket close-bracket)
-      (let* ((most-try (completion-try-completion
-                        name
-	                ;; If the `comps' are 0-based, the result should be
-	                ;; the same with `comps'.
-                        (if base-size candidates comps)
-                        predicate
-                        (length name)))
+      (let* ((most-try
+              (if (and base-size (> base-size 0))
+                  (completion-try-completion
+                   name candidates predicate (length name))
+                ;; If the `comps' are 0-based, the result should be
+                ;; the same with `comps'.
+                (completion-try-completion
+                 name comps nil (length name))))
 	     (most (if (consp most-try) (car most-try) (car comps)))
              ;; Compare name and most, so we can determine if name is
              ;; a prefix of most, or something else.