fix(dired): fail gracefully if pdf-tools isn't installed
Will throw a "void-variable pdf-info-epdfinfo-program" error if pdf-tools isn't installed (or `:tools pdf` is disabled).
This commit is contained in:
parent
a6c3c6842a
commit
4ed3e75f5f
1 changed files with 2 additions and 2 deletions
|
@ -213,8 +213,8 @@ Fixes #3939: unsortable dired entries on Windows."
|
|||
(defadvice! +dired--autoload-pdf-tools-a (fn &rest args)
|
||||
:around #'dirvish-pdf-dp
|
||||
(when (equal (nth 1 args) "pdf")
|
||||
(require 'pdf-tools nil t)
|
||||
(if (file-exists-p pdf-info-epdfinfo-program)
|
||||
(if (and (require 'pdf-tools nil t)
|
||||
(file-exists-p pdf-info-epdfinfo-program))
|
||||
(apply fn args)
|
||||
'(info . "`epdfinfo' program required to preview pdfs; run `M-x pdf-tools-install'")))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue