branch: elpa/pdf-tools
commit 2e4b7bc3512017309c47e9db2ed419a872a79c28
Author: Vedang Manerikar <[email protected]>
Commit: Vedang Manerikar <[email protected]>

    fix(pdf-view): fix docstring warnings for native-comp
    
    Reformat docstrings in pdf-view--bounding-box-to-slice,
    pdf-document-common-bounding-box, and pdf-view-set-slice-common-bounding-box
    to be under 80 characters wide and use proper quoting conventions.
    
    Ref #333
---
 lisp/pdf-view.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/pdf-view.el b/lisp/pdf-view.el
index 512366930dc..eabcce49396 100644
--- a/lisp/pdf-view.el
+++ b/lisp/pdf-view.el
@@ -980,7 +980,9 @@ dragging it to its bottom-right corner.  See also
                   (/ 1.0 (float (cdr size))))))))
 
 (defun pdf-view--bounding-box-to-slice (bb)
-  "Convert a '(LEFT TOP RIGHT BOTTOM) bounding box to '(X Y WIDTH HEIGHT), the 
format accepted by `pdf-view-set-slice'."
+  "Convert bounding box BB to slice format for `pdf-view-set-slice'.
+BB is a list (LEFT TOP RIGHT BOTTOM).
+Returns a list (X Y WIDTH HEIGHT)."
   (let* ((margin (max 0 (or pdf-view-bounding-box-margin 0)))
          (halfmargin (/ margin 2)))
     (cl-destructuring-bind (left top right bottom) bb
@@ -1004,7 +1006,8 @@ See also `pdf-view-bounding-box-margin'."
            (append slice (and window (list window))))))
 
 (defun pdf-document-common-bounding-box (&optional file-or-buffer)
-  "Return the common bounding for all pages in document FILE-OR-BUFFER, as 
'(LEFT TOP RIGHT BOTTOM)."
+  "Return the common bounding box for all pages in FILE-OR-BUFFER.
+Returns a list (LEFT TOP RIGHT BOTTOM)."
   (let ((left 1.0)
         (top 1.0)
         (right 0.0)
@@ -1018,10 +1021,9 @@ See also `pdf-view-bounding-box-margin'."
     (list left top right bottom)))
 
 (defun pdf-view-set-slice-common-bounding-box (&optional window)
-  "Set the slice from the common bounding box, combined from all pages.
-
-The bounding box is calculated using the document in WINDOW, which defaults to 
`selected-window`.
+  "Set the slice from the common bounding box of all pages.
 
+WINDOW specifies which document to use; defaults to `selected-window'.
 A margin is added from `pdf-view-bounding-box-margin'."
   (interactive)
   (let* ((bb (pdf-document-common-bounding-box))

Reply via email to