# HG changeset patch # User Stefan Monnier # Date 1211291090 0 # Node ID 17032874a3da03310bac50886bb881a4c8d3b75b # Parent 19b17460204b6f6b4c2dd5718231602f2cde7020 (icomplete-completions): Don't use `predicate' with a table of a different type than `candidates'. diff -r 19b17460204b -r 17032874a3da lisp/ChangeLog --- 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 + + * icomplete.el (icomplete-completions): Don't use `predicate' with + a table of a different type than `candidates'. + 2008-05-20 Roland Winkler * proced.el (proced-goal-header-re): Renamed from diff -r 19b17460204b -r 17032874a3da lisp/icomplete.el --- 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.