From 5579eb585c7989487afcfdb49a4102fda1f3c268 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Sun, 12 Dec 2021 16:24:32 +0100 Subject: [PATCH] Load the pdf-tools modules lazily by means of pdf-loader-install --- README.org | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.org b/README.org index cdf23b2..0de2c44 100644 --- a/README.org +++ b/README.org @@ -590,11 +590,12 @@ installation of [[https://github.com/vedang/pdf-tools][pdf-tools]] from [[https: rebuild the =epdfinfo= executable that serves the [[https://en.wikipedia.org/wiki/PDF][PDF]] files to Emacs. #+begin_src emacs-lisp - (when (fboundp 'pdf-tools-install) - (autoload 'pdf-view-mode "pdf-view") - (add-to-list 'magic-mode-alist '("%PDF" . pdf-view-mode))) + ;; 'pdf-loader-install' is the lazy equivalent of 'pdf-tools-install': + ;; see the README file. + (when (fboundp 'pdf-loader-install) + (pdf-loader-install)) - (with-eval-after-load 'pdf-tools + (with-eval-after-load 'pdf-view (when (fboundp 'pdf-view-restore-mode) (add-hook 'pdf-view-mode-hook #'pdf-view-restore-mode))) #+end_src