summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2023-04-13 09:17:25 +0200
committerDaniel Mendler <mail@daniel-mendler.de>2023-04-13 09:20:30 +0200
commitf4ed6f198d5995e693bf452e875b2b09469fccfb (patch)
treeb6274ce4b13ac815830012ba4db24c1f2fcf6192
parentfb85655fafc082f7d67898553cb841d74c7bc411 (diff)
Update Capf properties (Fix #81)
-rw-r--r--cape.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/cape.el b/cape.el
index 0bed89d..2d1e329 100644
--- a/cape.el
+++ b/cape.el
@@ -823,6 +823,7 @@ completion table is refreshed on every input change."
(setq valid (or valid #'equal))
(pcase (funcall capf)
(`(,beg ,end ,table . ,plist)
+ (setq plist `(:corfu--buster t . ,plist))
`(,beg ,end
,(let* ((beg (copy-marker beg))
(end (copy-marker end t))
@@ -832,10 +833,11 @@ completion table is refreshed on every input change."
(unless (or (string-match-p "\\s-" new-input) ;; Support Orderless
(funcall valid input new-input))
(pcase (funcall capf)
- (`(,_beg ,_end ,new-table . ,_plist)
- ;; NOTE: We have to make sure that the completion table is interruptible.
- ;; An interruption should not happen between the setqs.
- (setq table new-table input new-input)))))
+ (`(,_beg ,_end ,new-table . ,new-plist)
+ (let (throw-on-input) ;; No interrupt during state update
+ (setf table new-table
+ input new-input
+ (cddr plist) new-plist))))))
(complete-with-action action table str pred)))
,@plist))))