branch: elpa commit 23888157e7152c2b18b5c5b516a8636ae2a97f9b Author: Mosè Giordano <m...@gnu.org> Commit: Mosè Giordano <m...@gnu.org>
Change test for PDF Tools availability * tex.el (TeX-pdf-tools-sync-view): Change test for PDF Tools availability, in order to make it possible to postpone loading of the package, for example when using "use-package". Fixes bug#23803. --- tex.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tex.el b/tex.el index 9424d3f..6c302bb 100644 --- a/tex.el +++ b/tex.el @@ -1262,8 +1262,11 @@ DE is the name of the desktop environment, either \"gnome\" or If `TeX-source-correlate-mode' is disabled, only find and pop to the output PDF file. Used by default for the PDF Tools viewer entry in `TeX-view-program-list-builtin'." - (unless (featurep 'pdf-tools) - (error "PDF Tools are not installed")) + ;; Make sure `pdf-tools' is at least in the `load-path', but the user must + ;; take care of properly loading and installing the package. We used to test + ;; "(featurep 'pdf-tools)", but that doesn't play well with deferred loading. + (unless (fboundp 'pdf-tools-install) + (error "PDF Tools are not available")) (unless TeX-PDF-mode (error "PDF Tools only work with PDF output")) (add-hook 'pdf-sync-backward-redirect-functions