summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Politz <politza@hochschule-trier.de>2017-03-01 08:12:09 +0100
committerAndreas Politz <politza@hochschule-trier.de>2017-03-01 08:12:09 +0100
commit7cca03bd2fc534a6b42eafc2afef20099bf83dbf (patch)
tree2fa03f6b6f2eca89a3cdc1f2389199fad988fa79
parent3a32d2420cc40ed864215f75aae4f6d868dc1cd2 (diff)
Delete trailing whitespace
-rw-r--r--lisp/pdf-annot.el66
-rw-r--r--lisp/pdf-cache.el16
-rw-r--r--lisp/pdf-dev.el6
-rw-r--r--lisp/pdf-history.el6
-rw-r--r--lisp/pdf-info.el84
-rw-r--r--lisp/pdf-isearch.el10
-rw-r--r--lisp/pdf-links.el12
-rw-r--r--lisp/pdf-misc.el10
-rw-r--r--lisp/pdf-occur.el4
-rw-r--r--lisp/pdf-outline.el42
-rw-r--r--lisp/pdf-sync.el28
-rw-r--r--lisp/pdf-tools.el28
-rw-r--r--lisp/pdf-util.el32
-rw-r--r--lisp/pdf-view.el32
-rw-r--r--lisp/pdf-virtual.el16
-rw-r--r--server/configure.ac1
16 files changed, 197 insertions, 196 deletions
diff --git a/lisp/pdf-annot.el b/lisp/pdf-annot.el
index 80cae41..d2db701 100644
--- a/lisp/pdf-annot.el
+++ b/lisp/pdf-annot.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2013, 2014 Andreas Politz
;; Author: Andreas Politz <politza@fh-trier.de>
-;; Keywords:
+;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -234,7 +234,7 @@ Setting this after the package was loaded has no effect."
:group 'pdf-annot
:type 'key-sequence)
-(defvar pdf-annot-minor-mode-map
+(defvar pdf-annot-minor-mode-map
(let ((kmap (make-sparse-keymap))
(smap (make-sparse-keymap)))
(define-key kmap pdf-annot-minor-mode-map-prefix smap)
@@ -281,7 +281,7 @@ Setting this after the package was loaded has no effect."
(defun pdf-annot-create-context-menu (a)
"Create a appropriate context menu for annotation A."
- (let ((menu (make-sparse-keymap)))
+ (let ((menu (make-sparse-keymap)))
;; (when (and (bound-and-true-p pdf-misc-menu-bar-minor-mode)
;; (bound-and-true-p pdf-misc-install-popup-menu))
;; (set-keymap-parent menu
@@ -370,7 +370,7 @@ Setting this after the package was loaded has no effect."
ALIST should be a property list as returned by
`pdf-cache-getannots'. BUFFER should be the buffer of the
corresponding PDF document. It defaults to the current buffer."
-
+
(cons `(buffer . ,(or buffer (current-buffer)))
alist))
@@ -390,7 +390,7 @@ current buffer."
(setq types (list types)))
(with-current-buffer buffer
(let (result)
- (dolist (a (pdf-info-getannots pages))
+ (dolist (a (pdf-info-getannots pages))
(when (or (null types)
(memq (pdf-annot-get a 'type) types))
(push (pdf-annot-create a) result)))
@@ -416,7 +416,7 @@ modified flag and runs the hook `pdf-annot-modified-functions'.
Signals an error, if PROPERTY is not modifiable.
Returns the modified annotation."
-
+
(declare (indent 2))
(unless (equal value (pdf-annot-get a property))
(unless (pdf-annot-property-modifiable-p a property)
@@ -442,12 +442,12 @@ Redisplay modified pages.
If `pdf-annot-inhibit-modification-hooks' in non-nil, this just
saves ANNOTATIONS and does not call the hooks until later, when
the variable is nil and this function is called again."
-
+
(unless (memq operation '(nil :insert :change :delete))
(error "Invalid operation: %s" operation))
(when (and (null operation) annotations)
(error "Missing operation argument"))
-
+
(when operation
(let ((list (plist-get pdf-annot-delayed-modified-annotations operation)))
(dolist (a annotations)
@@ -472,7 +472,7 @@ the variable is nil and this function is called again."
(t (copy-sequence union))
(nil nil))))
(pages (mapcar (lambda (a) (pdf-annot-get a 'page)) union)))
- (when union
+ (when union
(unwind-protect
(run-hook-with-args
'pdf-annot-modified-functions closure)
@@ -488,7 +488,7 @@ have identical id properties."
(pdf-annot-get-buffer a2))
(eq (pdf-annot-get-id a1)
(pdf-annot-get-id a2))))
-
+
(defun pdf-annot-get-buffer (a)
"Return annotation A's buffer."
(pdf-annot-get a 'buffer))
@@ -587,8 +587,8 @@ The DO-SAVE argument is given to
(defun pdf-annot-attachment-delete-base-directory ()
"Delete all saved attachment files of the current buffer."
(setq pdf-annot--attachment-file-alist nil)
- (delete-directory (pdf-annot-attachment-base-directory) t))
-
+ (delete-directory (pdf-annot-attachment-base-directory) t))
+
(defun pdf-annot-attachment-unique-filename (attachment)
"Return a unique absolute filename for ATTACHMENT."
(let* ((filename (or (cdr (assq 'filename attachment))
@@ -612,7 +612,7 @@ The DO-SAVE argument is given to
(unless (file-exists-p directory)
(make-directory directory t))
unique))
-
+
(defun pdf-annot-attachment-save (attachment &optional regenerate-p)
"Save ATTACHMENT's data to a unique filename and return it's name.
@@ -711,7 +711,7 @@ Return the window attachment is displayed in."
IMAGE-SIZE should be a cons \(WIDTH . HEIGHT\) and defaults to
the page-image of the selected window."
-
+
(unless image-size
(pdf-util-assert-pdf-window)
(setq image-size (pdf-view-image-size)))
@@ -725,7 +725,7 @@ the page-image of the selected window."
"Set annotation A's position to X,Y in image coordinates.
See `pdf-annot-image-position' for IMAGE-SIZE."
-
+
(unless image-size
(pdf-util-assert-pdf-window)
(setq image-size (pdf-view-image-size)))
@@ -843,7 +843,7 @@ i.e. a non mouse-movement event is read."
(pdf-view-redisplay))))
(pdf-annot-run-modified-hooks)))
nil))
-
+
(defun pdf-annot-hotspot-function (page size)
"Create image hotspots for page PAGE of size SIZE."
(apply 'nconc (mapcar (lambda (a)
@@ -851,8 +851,8 @@ i.e. a non mouse-movement event is read."
'link)
(pdf-annot-create-hotspots a size)))
(pdf-annot-getannots page))))
-
-(defun pdf-annot-create-hotspots (a size)
+
+(defun pdf-annot-create-hotspots (a size)
"Return a list of image hotspots for annotation A."
(let ((id (pdf-annot-get-id a))
(edges (pdf-util-scale
@@ -872,7 +872,7 @@ i.e. a non mouse-movement event is read."
hotspots)))
(pdf-annot-create-hotspot-binding id moveable-p a)
hotspots))
-
+
;; FIXME: Define a keymap as a template for this. Much cleaner.
(defun pdf-annot-create-hotspot-binding (id moveable-p annotation)
;; Activating
@@ -906,7 +906,7 @@ Turn to A's page in WINDOW, and scroll it if necessary.
If HIGHLIGHT-P is non-nil, visually distinguish annotation A from
other annotations."
-
+
(save-selected-window
(when window (select-window window))
(pdf-util-assert-pdf-window)
@@ -976,7 +976,7 @@ Return the new annotation."
(setq edges (list edges)))
(when (and (eq type 'text)
(> (length edges) 1))
- (error "Edges argument should be a single edge-list for text annotations"))
+ (error "Edges argument should be a single edge-list for text annotations"))
(let* ((a (apply 'pdf-info-addannot
page
(if (eq type 'text)
@@ -1063,7 +1063,7 @@ Return the new annotation."
(pdf-util-read-image-position
"Click where a new text annotation should be added ..."))
(event-start ev))))
-
+
(defun pdf-annot-add-markup-annotation (list-of-edges type &optional color
property-alist)
"Add a new markup annotation in the selected window.
@@ -1158,8 +1158,8 @@ Offer `pdf-annot-color-history' as default values."
initial-input 'pdf-annot-color-history
defaults
inherit-input-method))))
- (read-color prompt)))
-
+ (read-color prompt)))
+
(defun pdf-annot-merge-alists (&rest alists)
"Merge ALISTS into a single one.
@@ -1171,8 +1171,8 @@ occurrence in ALISTS."
(unless (assq (car elt) merged)
(push elt merged)))
(nreverse merged)))
-
-
+
+
;; * ================================================================== *
;; * Displaying annotation contents
@@ -1321,7 +1321,7 @@ by a header."
(pdf-annot-get a 'contents))
'latex-mode
'text-mode)))
- (unless (derived-mode-p mode)
+ (unless (derived-mode-p mode)
(funcall mode))))
"A function for setting up, e.g. the major-mode, of the edit buffer.
@@ -1374,7 +1374,7 @@ annotation's contents and otherwise `text-mode'. "
(set-buffer-modified-p nil))
(dolist (win (get-buffer-window-list))
(quit-window do-kill win)))
-
+
(defun pdf-annot-edit-contents-save-annotation ()
(when pdf-annot-edit-contents--annotation
(pdf-annot-put pdf-annot-edit-contents--annotation
@@ -1417,7 +1417,7 @@ annotation's contents and otherwise `text-mode'. "
(display-buffer
(pdf-annot-edit-contents-noselect a)
pdf-annot-edit-contents-display-buffer-action)))
-
+
(defun pdf-annot-edit-contents-mouse (ev)
(interactive "@e")
(let* ((pos (posn-object-x-y (event-start ev)))
@@ -1499,7 +1499,7 @@ belong to the same page and A1 is displayed above/left of A2."
(if (pdf-annot-get a 'created)
(pdf-annot-print-property a 'created)
"Unknown date")))))
-
+
(define-derived-mode pdf-annot-list-mode tablist-mode "Annots"
(setq tabulated-list-entries 'pdf-annot-list-entries
tabulated-list-format (vector
@@ -1561,15 +1561,15 @@ belong to the same page and A1 is displayed above/left of A2."
(when (invisible-p (point))
(tablist-suspend-filter t))
(tablist-move-to-major-column)))))
-
-
+
+
(defun pdf-annot-list-update (&optional _fn)
(when (buffer-live-p pdf-annot-list-buffer)
(with-current-buffer pdf-annot-list-buffer
(unless tablist-edit-column-minor-mode
(tablist-revert))
(tablist-context-window-update))))
-
+
(defun pdf-annot-list-context-function (id buffer)
(with-current-buffer (get-buffer-create "*Contents*")
(set-window-buffer nil (current-buffer))
diff --git a/lisp/pdf-cache.el b/lisp/pdf-cache.el
index 7370773..84b9740 100644
--- a/lisp/pdf-cache.el
+++ b/lisp/pdf-cache.el
@@ -19,9 +19,9 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
-;;
+;;
;;; Code:
-;;
+;;
(require 'pdf-info)
(require 'pdf-util)
@@ -108,7 +108,7 @@ is nil and VALUE undefined."
(when pdf-cache--data
(dolist (page pages)
(remhash page pdf-cache--data))))
-
+
(defun pdf-cache-clear-data ()
(interactive)
(when pdf-cache--data
@@ -149,7 +149,7 @@ Make sure, not to modify it's return value." command)))
(define-pdf-cache-function boundingbox t)
(define-pdf-cache-function textregions t)
(define-pdf-cache-function pagesize t)
-
+
;; * ================================================================== *
;; * PNG image LRU cache
@@ -157,7 +157,7 @@ Make sure, not to modify it's return value." command)))
(defvar pdf-cache-image-inihibit nil
"Non-nil, if the image cache should be bypassed.")
-
+
(defvar-local pdf-cache--image-cache nil)
(defmacro pdf-cache--make-image (page width data hash)
@@ -197,7 +197,7 @@ Does not modify the cache. See also `pdf-cache-get-image'."
(apply 'pdf-cache--image-match image spec))))))
(and image
(pdf-cache--image/data image))))
-
+
(defun pdf-cache-get-image (page min-width &optional max-width hash)
"Return PAGE's PNG data as a string.
@@ -214,7 +214,7 @@ Returns nil, if no matching image was found."
(while (and (cdr cache)
(not (pdf-cache--image-match
(car (cdr cache))
- page min-width max-width hash)))
+ page min-width max-width hash)))
(setq cache (cdr cache)))
(setq image (cadr cache))
(when (car cache)
@@ -447,7 +447,7 @@ Used solely in `pdf-cache--prefetch-start'.")
(defun pdf-cache--prefetch-stop ()
"Stop prefetching images in current buffer."
(setq pdf-cache--prefetch-pages nil))
-
+
(defun pdf-cache--prefetch-cancel ()
"Cancel prefetching images in current buffer."
(pdf-cache--prefetch-stop)
diff --git a/lisp/pdf-dev.el b/lisp/pdf-dev.el
index 67d99a9..6273b3e 100644
--- a/lisp/pdf-dev.el
+++ b/lisp/pdf-dev.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2015 Andreas Politz
;; Author: Andreas Politz <politza@hochschule-trier.de>
-;; Keywords:
+;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
-;;
+;;
;; This file is only ment for developers. The entry point is
;; pdf-dev-minor-mode, which see.
@@ -41,7 +41,7 @@
(push file loaded)
(load-file file))
(message "Loaded %s" (mapconcat 'identity loaded " "))))
-
+
(define-minor-mode pdf-dev-minor-mode
"Make developing pdf-tools easier.
diff --git a/lisp/pdf-history.el b/lisp/pdf-history.el
index e3985e2..433d7e3 100644
--- a/lisp/pdf-history.el
+++ b/lisp/pdf-history.el
@@ -19,7 +19,7 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
-;;
+;;
(require 'pdf-view)
(require 'pdf-util)
@@ -108,7 +108,7 @@ represents the current page."
"Return t, if at the end of the history."
(= pdf-history-index
(1- (length pdf-history-stack))))
-
+
(defun pdf-history-backward (n)
"Go N-times backward in the history."
(interactive "p")
@@ -131,7 +131,7 @@ represents the current page."
"Go N-times forward in the history."
(interactive "p")
(pdf-history-backward (- n)))
-
+
(defun pdf-history-goto (n)
"Go to item N in the history."
(interactive "p")
diff --git a/lisp/pdf-info.el b/lisp/pdf-info.el
index 95a1033..3167f03 100644
--- a/lisp/pdf-info.el
+++ b/lisp/pdf-info.el
@@ -40,11 +40,11 @@
;; to realize, annotations retrieved or created are referenced by a
;; unique symbol. Saving these changes creates a new file, the
;; original document is never touched.
-
+
;;; Todo:
;;
;; + Close documents at some time (e.g. when the buffer is killed)
-;;
+;;
;;; Code:
@@ -60,7 +60,7 @@
(defgroup pdf-info nil
"Extract infos from pdf-files via a helper process."
:group 'pdf-tools)
-
+
(defcustom pdf-info-epdfinfo-program
(expand-file-name (if (eq system-type 'windows-nt)
"epdfinfo.exe"
@@ -201,7 +201,7 @@ server, that it never ran.")
(error "pdf-info-epdfinfo-error-filename should be nil or a writable filename")))
(let ((tempfile (make-temp-file "pdf-info-check-epdfinfo"))
(default-directory "~"))
- (unwind-protect
+ (unwind-protect
(with-temp-buffer
(with-temp-file tempfile
(insert "quit\n"))
@@ -211,13 +211,13 @@ server, that it never ran.")
(list pdf-info-epdfinfo-error-filename))))
(error "Error running `%s': %s"
pdf-info-epdfinfo-program
- (buffer-string))))
+ (buffer-string))))
(when (file-exists-p tempfile)
(delete-file tempfile)))))
(when interactive-p
(message "The epdfinfo program appears to be working."))
nil)
-
+
(defun pdf-info-process-assert-running (&optional force)
"Assert a running process.
@@ -244,7 +244,7 @@ error."
(y-or-n-p "The epdfinfo server quit, restart it ? "))
(and pdf-info-restart-process-p
(not (eq pdf-info-restart-process-p 'ask))))
-
+
(when (eq pdf-info-restart-process-p 'ask)
(setq pdf-info-restart-process-p nil))
(error "The epdfinfo server quit"))
@@ -337,7 +337,7 @@ error."
(error "The epdfinfo server quit unexpectedly."))
(cond
((null status) response)
- ((eq status 'error)
+ ((eq status 'error)
(error "epdfinfo: %s" response))
((eq status 'interrupted)
(error "epdfinfo: Command was interrupted"))
@@ -350,7 +350,7 @@ error."
(eq (process-status (pdf-info-process))
'run))
(signal-process (pdf-info-process) 'SIGUSR1)))
-
+
(defun pdf-info-query--escape (arg)
"Escape ARG for transmission to the server."
(if (null arg)
@@ -369,7 +369,7 @@ error."
(backward-char)))
(forward-char))
(buffer-substring-no-properties 1 (point-max)))))
-
+
(defmacro pdf-info-query--read-record ()
"Read a single record of the response in current buffer."
`(let (records done (beg (point)))
@@ -763,21 +763,21 @@ i.e. `pdf-info-asynchronous' is non-nil, transparently.
(listp (cdr form))))
let-forms)
(error "Invalid let-form: %s" let-forms))
-
+
(setq let-forms (mapcar (lambda (form)
(if (symbolp form)
(list form)
form))
let-forms))
(let* ((status (make-symbol "status"))
- (response (make-symbol "response"))
+ (response (make-symbol "response"))
(first-error (make-symbol "first-error"))
(done (make-symbol "done"))
(callback (make-symbol "callback"))
(results (make-symbol "results"))
(push-fn (make-symbol "push-fn"))
(terminal-fn (make-symbol "terminal-fn"))
- (buffer (make-symbol "buffer")))
+ (buffer (make-symbol "buffer")))
`(let* (,status
,response ,first-error ,done
(,buffer (current-buffer))
@@ -842,7 +842,7 @@ i.e. `pdf-info-asynchronous' is non-nil, transparently.
(when ,status
(error "epdfinfo: %s" ,response))
,response))))
-
+
;; * ================================================================== *
;; * Buffer local server instances
@@ -859,7 +859,7 @@ restart it."
(unless buffer
(setq buffer (current-buffer)))
(with-current-buffer buffer
- (unless (and
+ (unless (and
(not force-restart-p)
(local-variable-p 'pdf-info--queue)
(processp (pdf-info-process))
@@ -942,7 +942,7 @@ A No-op, if BUFFER has not running server instance."
(setq pdf-info-features
(let (pdf-info-asynchronous)
(pdf-info-query 'features)))))
-
+
(defun pdf-info-writable-annotations-p ()
(not (null (memq 'writable-annotations (pdf-info-features)))))
@@ -1014,7 +1014,7 @@ document."
(pdf-info-query
'metadata
(pdf-info--normalize-file-or-buffer file-or-buffer)))
-
+
(defun pdf-info-search-string (string &optional pages file-or-buffer)
"Search for STRING in PAGES of document FILE-OR-BUFFER.
@@ -1080,7 +1080,7 @@ searching for regular expressions.
You should not change this directly, but rather `let'-bind it
around a call to `pdf-info-search-regexp'.
-Valid compile-flags are:
+Valid compile-flags are:
newline-crlf, newline-lf, newline-cr, dupnames, optimize,
no-auto-capture, raw, ungreedy, dollar-endonly, anchored,
@@ -1089,7 +1089,7 @@ extended, dotall, multiline and caseless.
Note that the last one, caseless, is handled special, as it is
always added if `case-fold-search' is non-nil.
-And valid match-flags:
+And valid match-flags:
match-anchored, match-notbol, match-noteol, match-notempty,
match-partial, match-newline-cr, match-newline-lf,
@@ -1098,7 +1098,7 @@ match-newline-crlf and match-newline-any.
See the glib documentation at url
`https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html'.")
-(defun pdf-info-search-regexp (pcre &optional pages
+(defun pdf-info-search-regexp (pcre &optional pages
no-error
file-or-buffer)
"Search for a PCRE on PAGES of document FILE-OR-BUFFER.
@@ -1112,7 +1112,7 @@ Uses the flags in `pdf-info-regexp-flags', which see. If
If NO-ERROR is non-nil, catch errors due to invalid regexps and
return nil. If it is the symbol `invalid-regexp', then re-signal
this kind of error as a `invalid-regexp' error."
-
+
(cl-labels ((orflags (flags alist)
(cl-reduce
(lambda (v flag)
@@ -1128,7 +1128,7 @@ this kind of error as a `invalid-regexp' error."
(car pages)
(cdr pages)
pcre
- (orflags `(,(if case-fold-search
+ (orflags `(,(if case-fold-search
'caseless)
,@pdf-info-regexp-flags)
(pdf-info-regexp-compile-flags))
@@ -1273,7 +1273,7 @@ The size is in PDF points."
(pdf-info-query
'pagesize
(pdf-info--normalize-file-or-buffer file-or-buffer)
- page))
+ page))
(defun pdf-info-running-p ()
"Return non-nil, if the server is running."
@@ -1320,7 +1320,7 @@ This function returns the annotations for PAGES as a list of
alists. Each element of this list describes one annotation and
contains the following keys.
-page - Its page number.
+page - Its page number.
edges - Its area.
type - A symbol describing the annotation's type.
id - A document-wide unique symbol referencing this annotation.
@@ -1344,7 +1344,7 @@ contains the following keys.
text-icon - A string describing the purpose of this annotation.
text-state - A string, e.g. accepted or rejected." ;FIXME: Use symbols ?
-
+
(let ((pages (pdf-info-normalize-page-range pages)))
(pdf-info-query
'getannots
@@ -1410,13 +1410,13 @@ does not exist.
EDGES should be a list \(LEFT TOP RIGHT BOT\). RIGHT and/or BOT
may also be negative, which means to keep the width
resp. height."
- (pdf-info-editannot id `((edges . ,edges)) file-or-buffer))
+ (pdf-info-editannot id `((edges . ,edges)) file-or-buffer))
(defun pdf-info-editannot (id modifications &optional file-or-buffer)
"Edit annotation ID, applying MODIFICATIONS.
ID should be a symbol, which was previously returned in a
-`pdf-info-getannots' query.
+`pdf-info-getannots' query.
MODIFICATIONS is an alist of properties and their new values.
@@ -1452,7 +1452,7 @@ returned and owned by the caller."
(pdf-info-assert-writable-annotations)
(pdf-info-query
'save
- (pdf-info--normalize-file-or-buffer file-or-buffer)))
+ (pdf-info--normalize-file-or-buffer file-or-buffer)))
(defun pdf-info-getattachment-from-annot (id &optional do-save file-or-buffer)
"Return the attachment associated with annotation ID.
@@ -1506,7 +1506,7 @@ PDF document.
Returns an alist with entries PAGE and relative EDGES describing
the position in the PDF document corresponding to the SOURCE
location."
-
+
(let ((source (if (buffer-live-p (get-buffer source))
(buffer-file-name (get-buffer source))
source)))
@@ -1516,7 +1516,7 @@ location."
source
(or line 1)
(or column 1))))
-
+
(defun pdf-info-synctex-backward-search (page &optional x y file-or-buffer)
"Perform a backward search with synctex.
@@ -1539,7 +1539,7 @@ Returns an alist with entries FILENAME, LINE and COLUMN."
Return the data of the corresponding PNG image."
(when (keywordp file-or-buffer)
(push file-or-buffer commands)
- (setq file-or-buffer nil))
+ (setq file-or-buffer nil))
(apply 'pdf-info-query
'renderpage
(pdf-info--normalize-file-or-buffer file-or-buffer)
@@ -1572,7 +1572,7 @@ Return the data of the corresponding PNG image."
REGIONS is a list determining foreground and background color and
the regions to render. So each element should look like \(FG BG
\(LEFT TOP RIGHT BOT\) \(LEFT TOP RIGHT BOT\) ... \) . The
-rendering is text-aware.
+rendering is text-aware.
If SINGLE-LINE-P is non-nil, the edges in REGIONS are each
supposed to be limited to a single line in the document. Setting
@@ -1581,11 +1581,11 @@ this, if applicable, avoids rendering problems.
For the other args see `pdf-info-renderpage'.
Return the data of the corresponding PNG image."
-
+
(when (consp file-or-buffer)
(push file-or-buffer regions)
(setq file-or-buffer nil))
-
+
(apply 'pdf-info-renderpage
page width file-or-buffer
(apply 'append
@@ -1600,7 +1600,7 @@ Return the data of the corresponding PNG image."
elt)))
regions))))
-(defun pdf-info-renderpage-highlight (page width
+(defun pdf-info-renderpage-highlight (page width
&optional file-or-buffer
&rest regions)
"Highlight regions on PAGE with width WIDTH using REGIONS.
@@ -1613,11 +1613,11 @@ STROKE-COLOR ALPHA \(LEFT TOP RIGHT BOT\) \(LEFT TOP RIGHT BOT\) ... \)
For the other args see `pdf-info-renderpage'.
Return the data of the corresponding PNG image."
-
+
(when (consp file-or-buffer)
(push file-or-buffer regions)
(setq file-or-buffer nil))
-
+
(apply 'pdf-info-renderpage
page width file-or-buffer
(apply 'append
@@ -1634,7 +1634,7 @@ Return the data of the corresponding PNG image."
"Return a bounding-box for PAGE.
Returns a list \(LEFT TOP RIGHT BOT\)."
-
+
(pdf-info-query
'boundingbox
(pdf-info--normalize-file-or-buffer file-or-buffer)
@@ -1650,7 +1650,7 @@ Returns a list \(LEFT TOP RIGHT BOT\)."
(push file-or-buffer options)
(setq file-or-buffer nil))
(unless (= (% (length options) 2) 0)
- (error "Missing a option value"))
+ (error "Missing a option value"))
(apply 'pdf-info-query
'setoptions
(pdf-info--normalize-file-or-buffer file-or-buffer)
@@ -1670,15 +1670,15 @@ Returns a list \(LEFT TOP RIGHT BOT\)."
(t (push value soptions)))
(push key soptions)))
soptions)))
-
-
+
+
(defun pdf-info-pagelabels (&optional file-or-buffer)
"Return a list of pagelabels.
Returns a list of strings corresponding to the labels of the
pages in FILE-OR-BUFFER."
-
+
(pdf-info-query
'pagelabels
(pdf-info--normalize-file-or-buffer file-or-buffer)))
diff --git a/lisp/pdf-isearch.el b/lisp/pdf-isearch.el
index 0e6ef81..d0e2129 100644
--- a/lisp/pdf-isearch.el
+++ b/lisp/pdf-isearch.el
@@ -21,7 +21,7 @@
;;; Commentary:
;;
;;; Todo:
-;;
+;;
;; * Add the possibility to limit the search to a range of pages.
(require 'cl-lib)
@@ -281,7 +281,7 @@ This is a Isearch interface function."
(re-search-forward ".")
(re-search-backward ".")))
((and (not pdf-isearch-narrow-to-page)
- (not (pdf-isearch-empty-match-p matches)))
+ (not (pdf-isearch-empty-match-p matches)))
(let ((next-page (pdf-isearch-find-next-matching-page
string pdf-isearch-current-page t)))
(when next-page
@@ -596,7 +596,7 @@ match."
;; Next match of new search closest to the last one.
(pdf-isearch-closest-match
last-match matches forward))))
-
+
(defun pdf-isearch-focus-match-isearch (match)
"Make the image area in MATCH visible in the selected window."
(pdf-util-scroll-to-edges (apply 'pdf-util-edges-union match)))
@@ -653,7 +653,7 @@ The direction in which to look is determined by FORWARD-P.
MATCH should be a list of edges, MATCHES a list of such element;
it is assumed to be ordered with respect to FORWARD-P."
-
+
(cl-check-type match pdf-isearch-match)
(cl-check-type matches (list-of pdf-isearch-match))
(let ((matched (apply 'pdf-util-edges-union match)))
@@ -743,7 +743,7 @@ MATCH-BG LAZY-FG LAZY-BG\)."
;; * ================================================================== *
;; The following isearch-search function is debuggable.
-;;
+;;
(when nil
(defun isearch-search ()
;; Do the search with the current search string.
diff --git a/lisp/pdf-links.el b/lisp/pdf-links.el
index 6b570a5..1d69db2 100644
--- a/lisp/pdf-links.el
+++ b/lisp/pdf-links.el
@@ -19,7 +19,7 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
-;;
+;;
(require 'pdf-info)
(require 'pdf-util)
@@ -123,7 +123,7 @@ links via \\[pdf-links-isearch-link].
(defun pdf-links-hotspots-function (page size)
"Create hotspots for links on PAGE using SIZE."
-
+
(let ((links (pdf-cache-pagelinks page))
(id-fmt "link-%d-%d")
(i 0)
@@ -148,7 +148,7 @@ links via \\[pdf-links-isearch-link].
(pdf-links-action-perform l)))
(local-set-key
(vector id t)
- 'pdf-util-image-map-mouse-event-proxy)))
+ 'pdf-util-image-map-mouse-event-proxy)))
(nreverse hotspots)))
(defun pdf-links-action-to-string (link)
@@ -225,7 +225,7 @@ scroll the current page."
(t
(error "Unrecognized link type: %s" .type)))
nil))
-
+
(defun pdf-links-read-link-action (prompt)
"Using PROMPT, interactively read a link-action.
@@ -258,7 +258,7 @@ See `pdf-links-action-perform' for the interface."
(error "No links on this page"))
(unwind-protect
(let ((image-data
- (pdf-cache-get-image
+ (pdf-cache-get-image
(pdf-view-current-page)
(car size) (car size) 'pdf-links-read-link-action)))
(unless image-data
@@ -340,7 +340,7 @@ See `pdf-links-action-perform' for the interface."
(unless links
(error "No link found at this position"))
(pdf-links-action-perform (car links))))))
-
+
(defun pdf-links-isearch-link-filter-matches (matches)
(let ((links (pdf-util-scale
(mapcar (apply-partially 'alist-get 'edges)
diff --git a/lisp/pdf-misc.el b/lisp/pdf-misc.el
index a6a2ad4..c3e6ad9 100644
--- a/lisp/pdf-misc.el
+++ b/lisp/pdf-misc.el
@@ -19,7 +19,7 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
-;;
+;;
(require 'pdf-view)
@@ -38,7 +38,7 @@
;;;###autoload
(define-minor-mode pdf-misc-minor-mode
"FIXME: Not documented."
- nil nil nil)
+ nil nil nil)
;;;###autoload
(define-minor-mode pdf-misc-size-indication-minor-mode
@@ -50,7 +50,7 @@
(unless (assq 'pdf-misc-size-indication-minor-mode
mode-line-position)
(setq mode-line-position
- `((pdf-misc-size-indication-minor-mode
+ `((pdf-misc-size-indication-minor-mode
(:eval (pdf-misc-size-indication)))
,@mode-line-position))))
(t
@@ -254,7 +254,7 @@ It is called with one argument, the PDF file."
'executable-find
'("gtklp" "xpp" "gpr")))))
buffer-file-name
- (programm
+ (programm
(expand-file-name
(read-file-name
"Print with: " default nil t nil 'file-executable-p))))
@@ -276,7 +276,7 @@ It is called with one argument, the PDF file."
(apply #'start-process "printing" nil programm args)
(message "Print job started: %s %s"
programm (mapconcat #'identity args " "))))
-
+
(provide 'pdf-misc)
diff --git a/lisp/pdf-occur.el b/lisp/pdf-occur.el
index 5aaf50d..f2572e9 100644
--- a/lisp/pdf-occur.el
+++ b/lisp/pdf-occur.el
@@ -602,7 +602,7 @@ matches linked with PAGE."
(defun pdf-occur-search-in-progress-p ()
(and (numberp pdf-occur-search-pages-left)
(> pdf-occur-search-pages-left 0)))
-
+
(defun pdf-occur-start-search (documents string
&optional regexp-p)
(pdf-occur-assert-occur-buffer-p)
@@ -715,7 +715,7 @@ in the search list."
((and (derived-mode-p 'pdf-view-mode)
(buffer-file-name))
(push (buffer-file-name) files)))))
-
+
(setq files
(cl-sort ;Looks funny.
(cl-set-difference
diff --git a/lisp/pdf-outline.el b/lisp/pdf-outline.el
index 3167b3b..f940b15 100644
--- a/lisp/pdf-outline.el
+++ b/lisp/pdf-outline.el
@@ -19,7 +19,7 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
-;;
+;;
(require 'outline)
(require 'pdf-links)
@@ -33,7 +33,7 @@
;;
;; User options
-;;
+;;
(defgroup pdf-outline nil
"Display a navigatable outline of a PDF document."
@@ -113,7 +113,7 @@ Usually a page's label is it's displayed page number."
;;
;; Internal Variables
-;;
+;;
(define-button-type 'pdf-outline
'face nil
@@ -130,7 +130,7 @@ Usually a page's label is it's displayed page number."
;;
;; Functions
-;;
+;;
;;;###autoload
(define-minor-mode pdf-outline-minor-mode
@@ -200,7 +200,7 @@ rebound to their respective last character.
(not (eq link pdf-outline-follow-mode-last-link)))
(setq pdf-outline-follow-mode-last-link link)
(pdf-outline-display-link (point)))))
-
+
;;;###autoload
(defun pdf-outline (&optional buffer no-select-window-p)
"Display an PDF outline of BUFFER.
@@ -247,7 +247,7 @@ buffer, unless NO-SELECT-WINDOW-P is non-nil."
;; (when (buffer-live-p (get-buffer buf))
;; (kill-buffer buf))
buf))
-
+
(defun pdf-outline-insert-outline (pdf-buffer)
(let ((labels (and pdf-outline-display-labels
(pdf-info-pagelabels pdf-buffer)))
@@ -300,7 +300,7 @@ buffer, unless NO-SELECT-WINDOW-P is non-nil."
;;
;; Commands
-;;
+;;
(defun pdf-outline-move-to-current-page ()
"Move to the item corresponding to the current page.
@@ -323,7 +323,7 @@ Open nodes as necessary."
(let ((win (selected-window)))
(pdf-outline-select-pdf-window t)
(quit-window kill win)))
-
+
(defun pdf-outline-up-heading (arg &optional invisible-ok)
"Like `outline-up-heading', but `push-mark' first."
(interactive "p")
@@ -331,7 +331,7 @@ Open nodes as necessary."
(outline-up-heading arg invisible-ok)
(unless (= pos (point))
(push-mark pos))))
-
+
(defun pdf-outline-end-of-buffer ()
"Move to the end of the outline buffer."
(interactive)
@@ -343,7 +343,7 @@ Open nodes as necessary."
(forward-line -1))
(unless (= pos (point))
(push-mark pos))))
-
+
(defun pdf-outline-link-at-pos (&optional pos)
(unless pos (setq pos (point)))
(let ((button (or (button-at pos)
@@ -351,7 +351,7 @@ Open nodes as necessary."
(and button
(button-get button
'pdf-outline-link))))
-
+
(defun pdf-outline-follow-link (&optional pos)
"Select PDF window and move to the page corresponding to POS."
(interactive)
@@ -372,7 +372,7 @@ Then quit the outline window."
(unless link
(error "Nothing to follow here"))
(pdf-links-action-perform link)))
-
+
(defun pdf-outline-display-link (&optional pos)
"Display the page corresponding to the link at POS."
(interactive)
@@ -423,7 +423,7 @@ Then quit the outline window."
(outline-up-heading 1 t)
(show-children)))
(back-to-indentation))
-
+
(defun pdf-outline-position-of-page (page)
(let (curpage)
(save-excursion
@@ -432,13 +432,13 @@ Then quit the outline window."
(< curpage page))
(forward-line))
(point))))
-
-
+
+
;;
;; Imenu Support
-;;
-
+;;
+
;;;###autoload
(defun pdf-outline-imenu-enable ()
@@ -460,7 +460,7 @@ Then quit the outline window."
(when (eq pdf-view-mode-map
(keymap-parent (current-local-map)))
(use-local-map (keymap-parent (current-local-map)))))
-
+
(defun pdf-outline-imenu-create-item (link &optional labels)
(let-alist link
@@ -470,7 +470,7 @@ Then quit the outline window."
0
'pdf-outline-imenu-activate-link
link)))
-
+
(defun pdf-outline-imenu-create-index-flat ()
(let ((labels (and pdf-outline-display-labels
(pdf-info-pagelabels)))
@@ -481,8 +481,8 @@ Then quit the outline window."
(push (pdf-outline-imenu-create-item item labels)
index))))
(nreverse index)))
-
-
+
+
(defun pdf-outline-imenu-create-index-tree ()
(pdf-outline-imenu-create-index-tree-1
(pdf-outline-treeify-outline-list
diff --git a/lisp/pdf-sync.el b/lisp/pdf-sync.el
index a56a77b..7dbe857 100644
--- a/lisp/pdf-sync.el
+++ b/lisp/pdf-sync.el
@@ -18,7 +18,7 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
-;;
+;;
;; The backward search uses a heuristic, which is pretty simple, but
;; effective: It extracts the text around the click-position in the
;; PDF, normalizes it's whitespace, deletes certain notorious
@@ -41,7 +41,7 @@
(defgroup pdf-sync nil
"Jump from TeX sources to PDF pages and back."
:group 'pdf-tools)
-
+
(defcustom pdf-sync-forward-display-pdf-key "C-c C-g"
"Key to jump from a TeX buffer to it's PDF file.
@@ -156,7 +156,7 @@ If nil, just go where Synctex tells us. Otherwise try to find
the exact location of the clicked-upon text in the PDF."
:group 'pdf-sync
:type 'boolean)
-
+
(defcustom pdf-sync-backward-text-translations
'((88 "X" "sum")
(94 "textasciicircum")
@@ -275,7 +275,7 @@ Has no effect if `pdf-sync-backward-use-heuristic' is nil."
:group 'pdf-sync
:type '(alist :key-type character
:value-type (repeat string)))
-
+
(defconst pdf-sync-backward-text-flush-regexp
"[][.ยท{}|\\]\\|\\C.\\|-\n+"
"Regexp of ignored text when backward searching.")
@@ -296,7 +296,7 @@ Has no effect if `pdf-sync-backward-use-heuristic' is nil."
(unless image
(error "Outside of image area"))
(pdf-sync-backward-search (car xy) (cdr xy))))
-
+
(defun pdf-sync-backward-search (x y)
"Go to the source corresponding to image coordinates X, Y.
@@ -334,7 +334,7 @@ point to the correct position."
data)
(list source
(if (not pdf-sync-backward-use-heuristic)
- (lambda nil
+ (lambda nil
(pdf-util-goto-position line column))
(let ((context (pdf-sync-backward--get-text-context page x y)))
(lambda nil
@@ -356,7 +356,7 @@ point to the correct position."
words swords similarity-fn 'infix)))
(setq alignment (cl-remove-if-not 'car (cdr alignment)))
(cl-assert (< windex (length alignment)))
-
+
(let ((word (cdr (nth windex alignment))))
(unless word
(setq chindex 0
@@ -378,7 +378,7 @@ point to the correct position."
((eq limit 'line)
(cons (line-beginning-position)
(line-end-position)))
-
+
;; Synctex usually jumps to the end macro, in case it
;; does not understand the environment.
((and (fboundp 'LaTeX-find-matching-begin)
@@ -469,12 +469,12 @@ point to the correct position."
prefix suffix
pdf-sync-backward-text-flush-regexp
pdf-sync-backward-text-translations))))
-
+
(defun pdf-sync-backward--tokenize (prefix &optional suffix flush-re translation)
(with-temp-buffer
(when prefix (insert prefix))
(let* ((center (copy-marker (point)))
- (case-fold-search nil))
+ (case-fold-search nil))
(when suffix (insert suffix))
(goto-char 1)
;; Delete ignored text.
@@ -553,7 +553,7 @@ word-level searching is desired."
(let ((functions
'(pdf-sync-backward-search
pdf-sync-backward--tokenize
- pdf-util-seq-alignment)))
+ pdf-util-seq-alignment)))
(cond
(pdf-sync-backward-debug-minor-mode
(dolist (fn functions)
@@ -591,7 +591,7 @@ Needs to have `pdf-sync-backward-debug-minor-mode' enabled."
(insert sep)
(insert (nth 0 (car text)))
(insert (propertize "<|>" 'face highlight))
- (insert (nth 1 (car text)))
+ (insert (nth 1 (car text)))
(insert sep)
(insert (propertize "Text Token:" 'face 'font-lock-keyword-face))
(insert sep)
@@ -660,7 +660,7 @@ Needs to have `pdf-sync-backward-debug-minor-mode' enabled."
(insert sep)
(goto-char 1)
(pop-to-buffer (current-buffer))))))
-
+
;; * ================================================================== *
;; * Forward search (TeX -> PDF)
@@ -785,7 +785,7 @@ The first such filename is returned, or nil if none was found."
(setq end beg
beg (point-min))
(goto-char beg)))))))))
-
+
;; * ================================================================== *
;; * Compatibility
diff --git a/lisp/pdf-tools.el b/lisp/pdf-tools.el
index 36ea234..41f28bd 100644
--- a/lisp/pdf-tools.el
+++ b/lisp/pdf-tools.el
@@ -30,7 +30,7 @@
;;
;; Note: This package requires external libraries and works currently
;; only on GNU/Linux systems.
-;;
+;;
;; Note: If you ever update it, you need to restart Emacs afterwards.
;;
;; To activate the package put
@@ -48,36 +48,36 @@
;; offers some customization options.
;; Features:
-;;
+;;
;; * View
;; View PDF documents in a buffer with DocView-like bindings.
-;;
-;; * Isearch
+;;
+;; * Isearch
;; Interactively search PDF documents like any other buffer. (Though
;; there is currently no regexp support.)
-;;
+;;
;; * Follow links
;; Click on highlighted links, moving to some part of a different
;; page, some external file, a website or any other URI. Links may
;; also be followed by keyboard commands.
-;;
+;;
;; * Annotations
;; Display and list text and markup annotations (like underline),
;; edit their contents and attributes (e.g. color), move them around,
;; delete them or create new ones and then save the modifications
;; back to the PDF file.
-;;
+;;
;; * Attachments
;; Save files attached to the PDF-file or list them in a dired buffer.
-;;
+;;
;; * Outline
;; Use imenu or a special buffer to examine and navigate the PDF's
;; outline.
-;;
+;;
;; * SyncTeX
;; Jump from a position on a page directly to the TeX source and
;; vice-versa.
-;;
+;;
;; * Misc
;; + Display PDF's metadata.
;; + Mark a region and kill the text from the PDF.
@@ -125,7 +125,7 @@ In order to customize dark and light colors use
pdf-view-auto-slice-minor-mode
pdf-occur-global-minor-mode
pdf-virtual-global-minor-mode))
-
+
(defcustom pdf-tools-enabled-modes
'(pdf-history-minor-mode
pdf-isearch-minor-mode
@@ -160,7 +160,7 @@ PDF buffers."
(defconst pdf-tools-auto-mode-alist-entry
'("\\.[pP][dD][fF]\\'" . pdf-view-mode)
"The entry to use for `auto-mode-alist'.")
-
+
(defun pdf-tools-customize ()
"Customize Pdf Tools."
(interactive)
@@ -188,7 +188,7 @@ PDF buffers."
"Whether PDF Tools should handle upgrading itself."
:group 'pdf-tools
:type 'boolean)
-
+
;;;###autoload
(when (and pdf-tools-handle-upgrades
(boundp 'pdf-info-epdfinfo-program)
@@ -317,7 +317,7 @@ CALLBACK may be a function, which will be locally put on
(defun pdf-tools-assert-pdf-buffer (&optional buffer)
(unless (pdf-tools-pdf-buffer-p buffer)
(error "Buffer does not contain a PDF document")))
-
+
(defun pdf-tools-set-modes-enabled (enable &optional modes)
(dolist (m (or modes pdf-tools-enabled-modes))
(let ((enabled-p (and (boundp m)
diff --git a/lisp/pdf-util.el b/lisp/pdf-util.el
index 71770af..630db2a 100644
--- a/lisp/pdf-util.el
+++ b/lisp/pdf-util.el
@@ -21,7 +21,7 @@
;;; Commentary:
;;
;;; Todo:
-;;
+;;
;;; Code:
@@ -127,7 +127,7 @@ remove the entry if the new value is `eql' to DEFAULT."
;; * ================================================================== *
-;; * Transforming coordinates
+;; * Transforming coordinates
;; * ================================================================== *
@@ -467,7 +467,7 @@ value of `next-screen-context-lines'.
Return the required vscroll in lines or nil, if scrolling is not
needed."
-
+
(pdf-util-assert-pdf-window)
(let* ((win (window-inside-pixel-edges))
(image-height (cdr (pdf-view-image-size t)))
@@ -501,7 +501,7 @@ needed."
Scroll as little as necessary. Unless EAGER-P is non-nil, in
which case scroll as much as possible."
-
+
(let ((vscroll (pdf-util-required-vscroll edges eager-p))
(hscroll (pdf-util-required-hscroll edges eager-p)))
(when vscroll
@@ -560,7 +560,7 @@ killed."
(defun pdf-util-delete-dedicated-directory ()
"Delete current buffer's dedicated directory."
(delete-directory (pdf-util-dedicated-directory) t))
-
+
(defun pdf-util-expand-file-name (name)
"Expand filename against current buffer's dedicated directory."
(expand-file-name name (pdf-util-dedicated-directory)))
@@ -575,7 +575,7 @@ See `make-temp-file' for the arguments."
;; * ================================================================== *
-;; * Various
+;; * Various
;; * ================================================================== *
(defmacro pdf-util-debug (&rest body)
@@ -603,7 +603,7 @@ See `make-temp-file' for the arguments."
(and (window-live-p window)
(with-selected-window window
(pdf-util-pdf-buffer-p))))
-
+
(defun pdf-util-assert-pdf-window (&optional window)
(unless (pdf-util-pdf-window-p window)
(error "Window's buffer is not in PdfView mode")))
@@ -627,7 +627,7 @@ is non-nil."
(defun pdf-util-hexcolor (color)
"Return COLOR in hex-format.
-Singal an error, if color is invalid."
+Singal an error, if color is invalid."
(if (string-match "\\`#[[:xdigit:]]\\{6\\}\\'" color)
color
(let ((values (color-values color)))
@@ -719,7 +719,7 @@ string."
(defadvice enable-theme (after pdf-util-clear-faces-cache activate)
(clrhash pdf-util--face-colors-cache))
-
+
(defun pdf-util-face-colors (face &optional dark-p)
"Return both colors of FACE as a cons.
@@ -798,7 +798,7 @@ AWINDOW is deleted."
COLUMN defaults to 0. Widen the buffer, if the position is
outside the current limits."
- (let ((pos
+ (let ((pos
(when (> line 0)
(save-excursion
(save-restriction
@@ -825,7 +825,7 @@ elements are equal, else -1.
ALIGNMENT-TYPE may be one of the symbols `prefix', `suffix',
`infix' or nil. If it is `prefix', trailing elements in SEQ2 may
-be ignored. For example the alignment of
+be ignored. For example the alignment of
\(0 1\) and \(0 1 2\)
@@ -907,7 +907,7 @@ respective sequence."
"Escape STRING for use as a PCRE.
See also `regexp-quote'."
-
+
(let ((to-escape
(eval-when-compile (append "\0\\|()[]{}^$*+?." nil)))
(chars (append string nil))
@@ -979,7 +979,7 @@ SPEC may contain the following keys, respectively values.
`:commands' A list of strings representing arguments to convert
for image manipulations. It may contain %-escape characters, as
-follows.
+follows.
%f -- Expands to the foreground color.
%b -- Expands to the background color.
@@ -1077,7 +1077,7 @@ Return the converted PNG image as a string. See also
(delete-file in-file))
(when (file-exists-p out-file)
(delete-file out-file)))))
-
+
(defun pdf-util-convert--create-commands (spec)
(let ((fg "red")
@@ -1134,10 +1134,10 @@ If RELATIVE-P is non-nil, also check that all values <= 1."
(>= x 0)
(or (null relative-p)
(<= x 1))))
- obj)))
+ obj)))
(defun pdf-util-edges-empty-p (edges)
- "Return non-nil, if EDGES area is empty."
+ "Return non-nil, if EDGES area is empty."
(pdf-util-with-edges (edges)
(or (<= edges-width 0)
(<= edges-height 0))))
diff --git a/lisp/pdf-view.el b/lisp/pdf-view.el
index 32799be..8e6752c 100644
--- a/lisp/pdf-view.el
+++ b/lisp/pdf-view.el
@@ -19,9 +19,9 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
-;;
+;;
;;; Code:
-;;
+;;
(require 'image-mode)
(require 'pdf-util)
@@ -58,7 +58,7 @@ other value behaves like `fit-width'."
"Fractional amount of resizing of one resize command."
:group 'pdf-view
:type 'number)
-
+
(defcustom pdf-view-continuous t
"In Continuous mode reaching the page edge advances to next/previous page.
@@ -153,7 +153,7 @@ used."
See :relief property in Info node `(elisp) Image Descriptors'."
:group 'pdf-view
- :type '(integer :tag "Pixel")
+ :type '(integer :tag "Pixel")
:link '(info-link "(elisp) Image Descriptors"))
(defcustom pdf-view-max-image-width 4800
@@ -267,7 +267,7 @@ regarding display of the region in the later function.")
(define-key map (kbd "C-c C-d") 'pdf-view-dark-minor-mode)
(define-key map (kbd "m") 'pdf-view-position-to-register)
(define-key map (kbd "'") 'pdf-view-jump-to-register)
-
+
(define-key map (kbd "C-c C-i") 'pdf-view-extract-region-image)
;; Rendering
(define-key map (kbd "C-c C-r m") 'pdf-view-midnight-minor-mode)
@@ -288,7 +288,7 @@ PNG images in Emacs buffers."
(let ((file-name-handler-alist nil))
(not (and buffer-file-name
(file-readable-p buffer-file-name)))))
- (pdf-tools-pdf-buffer-p))
+ (pdf-tools-pdf-buffer-p))
(let ((tempfile (pdf-util-make-temp-file
(concat (if buffer-file-name
(file-name-nondirectory
@@ -345,7 +345,7 @@ PNG images in Emacs buffers."
(add-hook 'kill-buffer-hook 'pdf-view-close-document nil t)
(pdf-view-add-hotspot-function
'pdf-view-text-regions-hotspots-function -9)
-
+
;; Keep track of display info
(add-hook 'image-mode-new-window-functions
'pdf-view-new-window-function nil t)
@@ -650,7 +650,7 @@ displayed page number."
(let ((index (cl-position label (pdf-info-pagelabels) :test 'equal)))
(unless index
(error "No such label: %s" label))
- (pdf-view-goto-page (1+ index))))
+ (pdf-view-goto-page (1+ index))))
;; * ================================================================== *
@@ -792,7 +792,7 @@ See also `pdf-view-use-imagemagick'."
(* 2 (car size)))))
(hotspots (pdf-view-apply-hotspot-functions
window page size)))
- (pdf-view-create-image data
+ (pdf-view-create-image data
:width (car size)
:map hotspots
:pointer 'arrow)))
@@ -1006,7 +1006,7 @@ This tells the various modes to use their face's dark colors."
(remove-hook 'after-save-hook enable t)
(remove-hook 'after-revert-hook enable t))))
(pdf-info-setoptions :render/printed pdf-view-printer-minor-mode)
- (pdf-cache-clear-images)
+ (pdf-cache-clear-images)
(pdf-view-redisplay t))
(define-minor-mode pdf-view-midnight-minor-mode
@@ -1094,7 +1094,7 @@ supercede hotspots in lower ones."
"Return the active region, a list of edges.
Deactivate the region if DEACTIVATE-P is non-nil."
-
+
(pdf-view-assert-active-region)
(prog1
pdf-view-active-region
@@ -1229,7 +1229,7 @@ This is more useful for commands like
(pdf-info-renderpage-text-regions
page width nil nil
`(,(car colors) ,(cdr colors) ,@region)))))))
-
+
(defun pdf-view-kill-ring-save ()
"Copy the region to the `kill-ring'."
(interactive)
@@ -1308,7 +1308,7 @@ the `convert' programm is used. "
"-gravity" "Center"
"-append"
"+gravity"
- "-chop" "0x10+0+0")
+ "-chop" "0x10+0+0")
:apply '((0 0 0 0))))
(with-current-buffer output-buffer
(let ((inhibit-read-only t))
@@ -1401,7 +1401,7 @@ works only with bookmarks created by
(let (bookmark-after-jump-hook)
(pdf-view-bookmark-jump-handler bmk)
(run-hooks 'bookmark-after-jump-hook))))
-
+
(defun pdf-view-registerv-make ()
"Create a PDF register entry of the current position."
(registerv-make
@@ -1445,7 +1445,7 @@ This macro may not work as desired when it is nested. See also
(progn ,@body)
(when ,dedicated-p
(setq pdf-view-register-alist register-alist))))))
-
+
(defun pdf-view-position-to-register (register)
"Store current PDF position in register REGISTER.
@@ -1460,7 +1460,7 @@ See also `point-to-register'."
"Move point to a position stored in a REGISTER."
(interactive
(pdf-view-with-register-alist
- (list
+ (list
(register-read-with-preview "Jump to register: ")
current-prefix-arg
(and (or pdf-view-use-dedicated-register
diff --git a/lisp/pdf-virtual.el b/lisp/pdf-virtual.el
index 5db8162..40b0271 100644
--- a/lisp/pdf-virtual.el
+++ b/lisp/pdf-virtual.el
@@ -28,7 +28,7 @@
;;
;; The trickiest part is to make theses intermediate functions behave
;; like the pdf-info-* equivalents in both the synchronous and
-;; asynchronous case.
+;; asynchronous case.
;;; Code:
(eval-when-compile
@@ -316,7 +316,7 @@ ranges corresponding to PAGES. Each element has the form
\(FILENAME \(FILE-FIRT-PAGE . FILE-LAST-PAGE\) REGION\)
.
"
-
+
(let ((begin (car pages))
(end (cdr pages)))
(unless (<= begin end)
@@ -328,7 +328,7 @@ ranges corresponding to PAGES. Each element has the form
(signal 'args-out-of-range (list 'pages pages)))
(while (<= begin end)
(let* ((page (aref arr (1- begin)))
- (filename (pdf-virtual-range-filename page))
+ (filename (pdf-virtual-range-filename page))
(offset (- (1- begin)
(pdf-virtual-range-index-start page)))
(first (+ (pdf-virtual-range-first page)
@@ -337,7 +337,7 @@ ranges corresponding to PAGES. Each element has the form
(pdf-virtual-range-last page)))
(region (pdf-virtual-range-region page)))
(push `(,filename (,first . ,last) ,region) result)
- (cl-incf begin (1+ (- last first)))))
+ (cl-incf begin (1+ (- last first)))))
(nreverse result))))
(pdf-virtual-document-defun number-of-pages (doc)
@@ -435,7 +435,7 @@ PAGE should be a page-number."
(pdf-virtual-range-filename other)))))))
(when page
(1+ (pdf-virtual-range-index-start page)))))
-
+
;; * ================================================================== *
;; * Modes
@@ -449,7 +449,7 @@ PAGE should be a page-number."
;;;###autoload
-(define-derived-mode pdf-virtual-edit-mode emacs-lisp-mode "VPDF-Edit"
+(define-derived-mode pdf-virtual-edit-mode emacs-lisp-mode "VPDF-Edit"
"Major mode when editing a virtual PDF buffer."
(buffer-enable-undo)
(setq-local buffer-read-only nil)
@@ -539,7 +539,7 @@ PAGE should be a page-number."
(with-current-buffer (generate-new-buffer buffer-name)
(insert ";; %VPDF 1.0\n\n")
(insert ";; File Format
-;;
+;;
;; FORMAT ::= ( FILES* )
;; FILES ::= ( FILE . PAGE-SPEC* )
;; PAGE-SPEC ::= PAGE | ( PAGE . REGION )
@@ -602,7 +602,7 @@ PAGE should be a page-number."
pdf-virtual-document))
(page (aref pages (1- pn)))
(first-filepage (1+ (pdf-virtual-range-index-start page))))
-
+
(when (and (< n 0)
(not (= first-filepage pn)))
(cl-incf n))
diff --git a/server/configure.ac b/server/configure.ac
index 5093247..908dbcb 100644
--- a/server/configure.ac
+++ b/server/configure.ac
@@ -53,6 +53,7 @@ if test "$HAVE_POPPLER_ANNOT_MARKUP" = yes; then
[Define to 1 to enable adding of markup annotations (requires poppler-glib >= 0.26).])
fi
+AC_CANONICAL_HOST
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h strings.h err.h])