From f4ed6f198d5995e693bf452e875b2b09469fccfb Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Thu, 13 Apr 2023 09:17:25 +0200 Subject: Update Capf properties (Fix #81) --- cape.el | 10 ++++++---- 1 file 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)))) -- cgit v1.0