emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/corfu-doc a0508b031e 85/95: Inline the function to scro


From: ELPA Syncer
Subject: [elpa] externals/corfu-doc a0508b031e 85/95: Inline the function to scroll the doc popup
Date: Tue, 19 Jul 2022 15:58:07 -0400 (EDT)

branch: externals/corfu-doc
commit a0508b031e921cf81df3d4389360cc6adc157e75
Author: Yuwei Tian <ibluefocus@outlook.com>
Commit: Yuwei Tian <ibluefocus@outlook.com>

    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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]