]> git.eshelyaron.com Git - emacs.git/commitdiff
(icomplete-completions): Don't use `predicate' with
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 20 May 2008 13:44:50 +0000 (13:44 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 20 May 2008 13:44:50 +0000 (13:44 +0000)
a table of a different type than `candidates'.

lisp/ChangeLog
lisp/icomplete.el

index c2014ac2fd9781c3425fa757959590bcf907f5ba..e98d6f938522367a0462ea5891d5a4669b1c5e02 100644 (file)
@@ -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
index 38fbf8f42e75663e69d7ed24c0df35a101c7d43d..369342e4d917f5af0aa137976d508ae4ac5e2bb4 100644 (file)
@@ -291,13 +291,14 @@ are exhibited within the square braces.)"
     ;; `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.