Fix #4397: call pdf-tools-install-noverify

So pdf-tools has a chance to set up its hooks.
This commit is contained in:
Henrik Lissner 2020-12-09 17:16:34 -05:00
parent 46ac4191e1
commit a5af17b6aa
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -38,9 +38,8 @@
(message nil) ; flush lingering prompt in echo-area (message nil) ; flush lingering prompt in echo-area
;; Make sure this doesn't run more than once ;; Make sure this doesn't run more than once
(advice-remove #'pdf-view-mode #'+pdf--install-epdfinfo-a) (advice-remove #'pdf-view-mode #'+pdf--install-epdfinfo-a)
(if (or (pdf-info-running-p) (unless (or (pdf-info-running-p)
(ignore-errors (pdf-info-check-epdfinfo) t)) (ignore-errors (pdf-info-check-epdfinfo) t))
(pdf-tools-install-noverify)
;; HACK On the first pdf you open (before pdf-tools loaded) ;; HACK On the first pdf you open (before pdf-tools loaded)
;; `pdf-tools-install' throws errors because it has hardcoded ;; `pdf-tools-install' throws errors because it has hardcoded
;; opinions about what buffer should be focused when it is run. ;; opinions about what buffer should be focused when it is run.
@ -61,6 +60,8 @@
(revert-buffer t t)))))))))) (revert-buffer t t))))))))))
((message "Aborted"))))) ((message "Aborted")))))
(pdf-tools-install-noverify)
;; For consistency with other special modes ;; For consistency with other special modes
(map! :map pdf-view-mode-map :gn "q" #'kill-current-buffer) (map! :map pdf-view-mode-map :gn "q" #'kill-current-buffer)