branch: externals/corfu-doc
commit a0508b031e921cf81df3d4389360cc6adc157e75
Author: Yuwei Tian <[email protected]>
Commit: Yuwei Tian <[email protected]>
Inline the function to scroll the doc popup
---
corfu-doc.el | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/corfu-doc.el b/corfu-doc.el
index 97359ed6ee..6c4ef3557a 100644
--- a/corfu-doc.el
+++ b/corfu-doc.el
@@ -518,21 +518,16 @@ The optional CANDIDATE-INDEX is the the current
completion candidate index."
#'corfu-doc--manual-popup-show corfu--index)))))
(corfu-doc--popup-hide))))
-(defun corfu-doc--funcall (function &rest args)
- "Call FUNCTION with ARGS in the documentation buffer."
- (when-let ((cf-doc-buf
- (and (corfu-doc--popup-visible-p)
- (get-buffer " *corfu-doc*"))))
- (when (functionp function)
- (with-selected-frame corfu-doc--frame
- (with-current-buffer cf-doc-buf
- (apply function args))))))
-
(defun corfu-doc--popup-scroll (n)
"Scroll text of the documentaion buffer window upward N lines.
See `scroll-up' for details."
- (corfu-doc--funcall #'scroll-up n))
+ (when-let ((cf-doc-buf
+ (and (corfu-doc--popup-visible-p)
+ (get-buffer " *corfu-doc*"))))
+ (with-selected-frame corfu-doc--frame
+ (with-current-buffer cf-doc-buf
+ (apply #'scroll-up n)))))
;;;###autoload
(defun corfu-doc-scroll-up (&optional n)