From aa9eb03be4b367f15c228864ad0db8aa5d30b4d9 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Sun, 17 May 2020 22:18:42 +0800 Subject: [PATCH] Build pdfinfo if needed. Close #212. --- lisp/init-reader.el | 9 +++++---- lisp/init-ui.el | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/init-reader.el b/lisp/init-reader.el index c59b472ea..bdf2f1471 100644 --- a/lisp/init-reader.el +++ b/lisp/init-reader.el @@ -46,7 +46,8 @@ ("C-s" . isearch-forward)) :init (setq pdf-annot-activate-created-annotations t) :config - (pdf-tools-install t nil t nil) + ;; Build pdfinfo if needed + (advice-add #'pdf-view-decrypt-document :before #'pdf-tools-install) ;; Set dark theme (defun my-pdf-view-set-midnight-colors () @@ -156,9 +157,9 @@ (when highlight-p (pdf-view-display-image (pdf-view-create-image - (pdf-cache-renderpage-highlight - page (car size) - `("white" "steel blue" 0.35 ,@edges)) + (pdf-cache-renderpage-highlight + page (car size) + `("white" "steel blue" 0.35 ,@edges)) :map (pdf-view-apply-hotspot-functions window page size) :width (car size)))) diff --git a/lisp/init-ui.el b/lisp/init-ui.el index 1fdb8d8b5..91128c279 100644 --- a/lisp/init-ui.el +++ b/lisp/init-ui.el @@ -225,6 +225,7 @@ (use-package hide-mode-line :hook (((completion-list-mode completion-in-region-mode + pdf-annot-list-mode flycheck-error-list-mode) . hide-mode-line-mode))) ;; A minor-mode menu for mode-line