Load the pdf-tools modules lazily by means of pdf-loader-install
This commit is contained in:
parent
7a54e7d90b
commit
5579eb585c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user