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

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

[elpa] externals/cape 84680339ca: Add cape-wrap/capf-nonexclusive


From: ELPA Syncer
Subject: [elpa] externals/cape 84680339ca: Add cape-wrap/capf-nonexclusive
Date: Fri, 2 Dec 2022 10:57:21 -0500 (EST)

branch: externals/cape
commit 84680339ca5c195c4c1574392e71e35dc549f3d2
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Add cape-wrap/capf-nonexclusive
---
 README.org | 1 +
 cape.el    | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/README.org b/README.org
index b5c796a99b..c6d6474527 100644
--- a/README.org
+++ b/README.org
@@ -231,6 +231,7 @@ the Capf transformers with =defalias= to a function symbol.
 - ~cape-wrap-accept-all~, ~cape-capf-accept-all~: Create a Capf which accepts 
every input as valid.
 - ~cape-wrap-silent~, ~cape-capf-silent~: Wrap a chatty Capf and silence it.
 - ~cape-wrap-purify~, ~cape-capf-purify~: Purify a broken Capf and ensure that 
it does not modify the buffer.
+- ~cape-wrap-nonexclusive~, ~cape-capf-nonexclusive:~ Mark Capf as 
non-exclusive.
 - ~cape-wrap-noninterruptible~, ~cape-capf-noninterruptible:~ Protect a Capf 
which does not like to be interrupted.
 - ~cape-wrap-case-fold~, ~cape-capf-case-fold~: Create a Capf which is case 
insensitive.
 - ~cape-wrap-properties~, ~cape-capf-properties~: Add completion properties to 
a Capf.
diff --git a/cape.el b/cape.el
index 4db11806c3..9c10c82e81 100644
--- a/cape.el
+++ b/cape.el
@@ -752,6 +752,11 @@ completion :category symbol can be specified."
             ,(apply #'cape--table-with-properties table properties)
             ,@properties ,@plist))))
 
+;;;###autoload
+(defun cape-wrap-nonexclusive (capf)
+  "Call CAPF and ensure that it is marked as non-exclusive."
+  (cape-wrap-properties capf :exclusive 'no))
+
 ;;;###autoload
 (defun cape-wrap-predicate (capf predicate)
   "Call CAPF and add an additional candidate PREDICATE.
@@ -845,6 +850,8 @@ If the prefix is long enough, enforce auto completion."
 (cape--capf-wrapper case-fold)
 ;;;###autoload (autoload 'cape-capf-noninterruptible "cape")
 (cape--capf-wrapper noninterruptible)
+;;;###autoload (autoload 'cape-capf-nonexclusive "cape")
+(cape--capf-wrapper nonexclusive)
 ;;;###autoload (autoload 'cape-capf-predicate "cape")
 (cape--capf-wrapper predicate)
 ;;;###autoload (autoload 'cape-capf-prefix-length "cape")



reply via email to

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