summaryrefslogtreecommitdiff
path: root/lisp/minibuffer.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-09-19 21:06:29 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2011-09-19 21:06:29 -0400
commit78054a469de3f8942d96eaf8c024070700ac9bae (patch)
tree076801842c97d47143edb28cb1d959fe376f9b84 /lisp/minibuffer.el
parent207c12ef2a59d5d61cef416283634f0b2e3bf24c (diff)
downloademacs-78054a469de3f8942d96eaf8c024070700ac9bae.tar.gz
* lisp/minibuffer.el (completion-file-name-table): Keep track of errors.
(completion-table-with-predicate): Handle the case where pred1 is nil. * lisp/pcomplete.el (pcomplete-completions-at-point): Simplify. Fixes: debbugs:9160
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r--lisp/minibuffer.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 820b1599abb..c6f28b14415 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -322,14 +322,15 @@ Note: TABLE needs to be a proper completion table which obeys predicates."
(test-completion string table pred2))
(t
(or (complete-with-action action table string
- (if (null pred2) pred1
+ (if (not (and pred1 pred2))
+ (or pred1 pred2)
(lambda (x)
;; Call `pred1' first, so that `pred2'
;; really can't tell that `x' is in table.
- (if (funcall pred1 x) (funcall pred2 x)))))
+ (and (funcall pred1 x) (funcall pred2 x)))))
;; If completion failed and we're not applying pred1 strictly, try
;; again without pred1.
- (and (not strict)
+ (and (not strict) pred1 pred2
(complete-with-action action table string pred2))))))
(defun completion-table-in-turn (&rest tables)
@@ -1774,7 +1775,7 @@ same as `substitute-in-file-name'."
(defun completion-file-name-table (string pred action)
"Completion table for file names."
- (ignore-errors
+ (with-demoted-errors
(cond
((eq action 'metadata) '(metadata (category . file)))
((eq (car-safe action) 'boundaries)