From 1d0d3abbd1035e46e3181d24ff7f895eec9feda6 Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Sun, 28 Nov 2021 00:21:56 +0100 Subject: Use namespaced symbol --- cape.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cape.el b/cape.el index c07cd7e..68d92bc 100644 --- a/cape.el +++ b/cape.el @@ -741,13 +741,13 @@ If INTERACTIVE is nil the function acts like a capf." (let ((old-toi throw-on-input) (throw-on-input nil)) (pcase (apply backend args) - (`(:async . ,fetcher) - (let ((res 'trash) + (`(:async . ,future) + (let ((res 'cape--waiting) (start (time-to-seconds))) - (funcall fetcher (lambda (arg) (setq res arg))) + (funcall future (lambda (arg) (setq res arg))) ;; Force synchronization. The synchronization is interruptible! (let ((throw-on-input old-toi)) - (while (eq res 'trash) + (while (eq res 'cape--waiting) (sleep-for cape-company-async-wait) (when (> (- (time-to-seconds) start) cape-company-async-timeout) (error "Cape company backend async timeout")))) -- cgit v1.0