summaryrefslogtreecommitdiff
path: root/lisp/icomplete.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2008-05-20 13:44:50 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2008-05-20 13:44:50 +0000
commitbe91065ff44cd5f77de8e87c42b281f297c8ac2c (patch)
tree86cb5673cf611a78463f43dee9c46dfd818fa36a /lisp/icomplete.el
parentfac97ac5a94c1bd611d5da40d14cdaaa71ccd9a3 (diff)
downloademacs-be91065ff44cd5f77de8e87c42b281f297c8ac2c.tar.gz
(icomplete-completions): Don't use `predicate' with
a table of a different type than `candidates'.
Diffstat (limited to 'lisp/icomplete.el')
-rw-r--r--lisp/icomplete.el15
1 files changed, 8 insertions, 7 deletions
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.