From be91065ff44cd5f77de8e87c42b281f297c8ac2c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 20 May 2008 13:44:50 +0000 Subject: [PATCH] (icomplete-completions): Don't use `predicate' with a table of a different type than `candidates'. --- lisp/ChangeLog | 5 +++++ lisp/icomplete.el | 15 ++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c2014ac2fd9..e98d6f93852 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/icomplete.el b/lisp/icomplete.el index 38fbf8f42e7..369342e4d91 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -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. -- 2.39.2