emacs-diffs
[Top][All Lists]
Advanced

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

master 77b4e06f8a: Move some of the doc-view variables around to fix loa


From: Lars Ingebrigtsen
Subject: master 77b4e06f8a: Move some of the doc-view variables around to fix load errors
Date: Thu, 27 Jan 2022 11:10:25 -0500 (EST)

branch: master
commit 77b4e06f8ad3d7ea399f38b2211e0eebc5dbfaa8
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Move some of the doc-view variables around to fix load errors
---
 lisp/doc-view.el | 52 ++++++++++++++++++++++++++--------------------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 4cc560755e..ee6aa05517 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -226,6 +226,32 @@ are available (see Info node `(emacs)Document View')"
 Higher values result in larger images."
   :type 'number)
 
+(defvar doc-view-doc-type nil
+  "The type of document in the current buffer.
+Can be `dvi', `pdf', `ps', `djvu', `odf', 'epub', `cbz', `fb2',
+`'xps' or `oxps'.")
+
+;; FIXME: The doc-view-current-* definitions below are macros because they
+;; map to accessors which we want to use via `setf' as well!
+(defmacro doc-view-current-page (&optional win)
+  `(image-mode-window-get 'page ,win))
+(defmacro doc-view-current-info () '(image-mode-window-get 'info))
+(defmacro doc-view-current-overlay () '(image-mode-window-get 'overlay))
+(defmacro doc-view-current-image () '(image-mode-window-get 'image))
+(defmacro doc-view-current-slice () '(image-mode-window-get 'slice))
+
+(defvar-local doc-view--current-cache-dir nil
+  "Only used internally.")
+
+(defun doc-view-custom-set-epub-font-size (option-name new-value)
+  (set-default option-name new-value)
+  (dolist (x (buffer-list))
+    (with-current-buffer x
+      (when (eq doc-view-doc-type 'epub)
+        (delete-directory doc-view--current-cache-dir t)
+        (doc-view-initiate-display)
+        (doc-view-goto-page (doc-view-current-page))))))
+
 (defcustom doc-view-epub-font-size nil
   "Font size in points for EPUB layout."
   :type 'integer
@@ -371,9 +397,6 @@ of the page moves to the previous page."
 (defvar-local doc-view--current-timer nil
   "Only used internally.")
 
-(defvar-local doc-view--current-cache-dir nil
-  "Only used internally.")
-
 (defvar-local doc-view--current-search-matches nil
   "Only used internally.")
 
@@ -388,11 +411,6 @@ files inside an archive it is a temporary copy of
 the (uncompressed, extracted) file residing in
 `doc-view-cache-directory'.")
 
-(defvar doc-view-doc-type nil
-  "The type of document in the current buffer.
-Can be `dvi', `pdf', `ps', `djvu', `odf', 'epub', `cbz', `fb2',
-`'xps' or `oxps'.")
-
 (defvar doc-view-single-page-converter-function nil
   "Function to call to convert a single page of the document to a bitmap file.
 May operate on the source document or on some intermediate (typically PDF)
@@ -586,24 +604,6 @@ Typically \"page-%s.png\".")
 
 ;;;; Navigation Commands
 
-;; FIXME: The doc-view-current-* definitions below are macros because they
-;; map to accessors which we want to use via `setf' as well!
-(defmacro doc-view-current-page (&optional win)
-  `(image-mode-window-get 'page ,win))
-(defmacro doc-view-current-info () '(image-mode-window-get 'info))
-(defmacro doc-view-current-overlay () '(image-mode-window-get 'overlay))
-(defmacro doc-view-current-image () '(image-mode-window-get 'image))
-(defmacro doc-view-current-slice () '(image-mode-window-get 'slice))
-
-(defun doc-view-custom-set-epub-font-size (option-name new-value)
-  (set-default option-name new-value)
-  (dolist (x (buffer-list))
-    (with-current-buffer x
-      (when (eq doc-view-doc-type 'epub)
-        (delete-directory doc-view--current-cache-dir t)
-        (doc-view-initiate-display)
-        (doc-view-goto-page (doc-view-current-page))))))
-
 (defun doc-view-last-page-number ()
   (length doc-view--current-files))
 



reply via email to

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