summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2021-11-24 20:31:24 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2021-11-24 20:31:24 +0100
commit693a3769135013f718c8ffcab21e5e502b558889 (patch)
treee2945cc97a1bbf8d4f4ce37765b7677a16c76992
parent0a05e51d2aad419b8650dcf81623887c85ce380d (diff)
Revert "Add cape-capf-with-predicate (See #9)"
This reverts commit 0a05e51d2aad419b8650dcf81623887c85ce380d.
-rw-r--r--README.org1
-rw-r--r--cape.el10
2 files changed, 0 insertions, 11 deletions
diff --git a/README.org b/README.org
index 8ec09ab..eef1a87 100644
--- a/README.org
+++ b/README.org
@@ -120,4 +120,3 @@ achieve a similarly refreshing strategy.
- ~cape-silent-capf~: Wrap a chatty Capf and silence it.
- ~cape-capf-with-properties~: Add completion properties to a Capf.
-- ~cape-capf-with-predicate~: Add predicate to control if the Capf should activate.
diff --git a/cape.el b/cape.el
index e041254..db93c6d 100644
--- a/cape.el
+++ b/cape.el
@@ -682,16 +682,6 @@ The CMP argument determines how the new input is compared to the old input.
('substring (string-match-p (regexp-quote old-input) new-input))))))
;;;###autoload
-(defun cape-capf-with-predicate (capf predicate)
- "Return a new CAPF which activates only when the PREDICATE is non-nil.
-The PREDICATE takes the completion beginning and end positions as arguments."
- (lambda ()
- (pcase (funcall capf)
- ((and result `(,beg ,end ,_table . ,_plist))
- (when (funcall predicate beg end)
- result)))))
-
-;;;###autoload
(defun cape-capf-with-properties (capf &rest properties)
"Return a new CAPF with additional completion PROPERTIES.
Completion properties include for example :exclusive, :annotation-function