summaryrefslogtreecommitdiff
path: root/cape.el
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2025-11-09 08:38:00 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2025-11-09 08:40:15 +0100
commit5982ad258f327dc4dd8618f35b8d4eb1372d0d89 (patch)
tree2efe1d84310b42c9f99cfbeab98c96a7d10dc2d4 /cape.el
parent1f02e92379fd02fbe468eb32d8afe5b56490dbe1 (diff)
cape-capf-properties: Simplify stripping properties
(cape-capf-properties #'some-capf :strip) (cape-capf-properties #'some-capf :strip t)
Diffstat (limited to 'cape.el')
-rw-r--r--cape.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/cape.el b/cape.el
index bc892ee..7726be0 100644
--- a/cape.el
+++ b/cape.el
@@ -1121,12 +1121,11 @@ This function can be used as an advice around an existing Capf."
"Call CAPF and strip or add completion PROPERTIES.
Completion properties include for example :exclusive, :category,
:annotation-function, :display-sort-function and various :company-*
-extensions. The :strip flag means to strip all completion properties."
+extensions. Strip all properties if PROPERTIES is :strip."
(pcase (funcall capf)
(`(,beg ,end ,table . ,plist)
`( ,beg ,end ,table
- ,@(and (not (plist-get properties :strip))
- (append properties plist))))))
+ ,@(and (not (eq :strip (car properties))) (append properties plist))))))
;;;###autoload
(defun cape-wrap-nonexclusive (capf)