summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2022-12-11 07:05:25 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2022-12-11 07:05:25 +0100
commitb174dcee1debc864d3ea964ce520b834c5d68df6 (patch)
tree09efeee7e7cae461d588ba0ed1f8e1ec7deffe14
parentd2e5c5bd20c7c5aa68aa92a10bd7095a098b2e75 (diff)
Simplify
-rw-r--r--corfu.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/corfu.el b/corfu.el
index 66f7d86..bc5b0a9 100644
--- a/corfu.el
+++ b/corfu.el
@@ -1192,10 +1192,9 @@ Auto completion is only performed if the tick did not change."
(remove-hook 'post-command-hook #'corfu--auto-post-command 'local)
(kill-local-variable 'completion-in-region-function))))
-(defun corfu--auto-capf-wrapper-async (fun callback)
- "Call asynchronous capf FUN with CALLBACK."
- (when (and (symbolp fun) (get fun 'async-completion-at-point-function))
- (funcall fun callback)))
+(defun corfu--auto-capf-wrapper-async (fun cb)
+ "Call asynchronous capf FUN with CB."
+ (and (symbolp fun) (get fun 'async-completion-at-point-function) (funcall fun cb)))
(defun corfu--capf-wrapper (fun &optional prefix)
"Wrapper for `completion-at-point' FUN.