diff options
| -rw-r--r-- | cape.el | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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")))) |
