From 422c87af1dafd57f4e8c97a70b2104a76c77d104 Mon Sep 17 00:00:00 2001 From: "Ryan C. Thompson" Date: Wed, 26 Jul 2017 11:14:13 -0700 Subject: [PATCH 2/2] Optimize completion-table-with-predicate for pred1 = nil --- lisp/minibuffer.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index bb8cf21ad2..3a79016d13 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -379,6 +379,9 @@ (defun completion-table-with-predicate (table pred1 strict string pred2 action) nothing. Note: TABLE needs to be a proper completion table which obeys predicates." (cond + ;; If pred1 is nil, pass through + ((null pred1) + (complete-with-action action table string pred2)) ((and (not strict) (eq action 'lambda)) ;; Ignore pred1 since it doesn't really have to apply anyway. (test-completion string table pred2)) -- 2.11.1