emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/corfu 3e0e65f 2/2: Allow corfu-commit-predicate=nil


From: ELPA Syncer
Subject: [elpa] externals/corfu 3e0e65f 2/2: Allow corfu-commit-predicate=nil
Date: Sun, 17 Oct 2021 09:57:16 -0400 (EDT)

branch: externals/corfu
commit 3e0e65f50a3060014d4b376a047607b8cf365032
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Allow corfu-commit-predicate=nil
---
 corfu.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/corfu.el b/corfu.el
index ab7a544..af2a7c3 100644
--- a/corfu.el
+++ b/corfu.el
@@ -68,7 +68,7 @@
 
 (defcustom corfu-commit-predicate #'corfu-candidate-selected-p
   "Automatically commit if the predicate returns t."
-  :type 'function)
+  :type '(choice (const nil) function))
 
 (defcustom corfu-quit-at-boundary nil
   "Automatically quit at completion field/word boundary.
@@ -696,7 +696,7 @@ completion began less than that number of seconds ago."
   "Insert selected candidate unless command is marked to continue completion."
   (add-hook 'window-configuration-change-hook #'corfu-quit)
   (unless (corfu--match-symbol-p corfu-continue-commands this-command)
-    (if (funcall corfu-commit-predicate)
+    (if (and corfu-commit-predicate (funcall corfu-commit-predicate))
         (corfu--insert 'exact)
       (setq corfu--index -1))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]