Improve the default value of 'doc-view-ghostscript-program'.
* lisp/doc-view.el (doc-view-ghostscript-program): Use plain command name instead of qualified name returned by executable-find (as suggested by Stefan Monnier). (Bug#36357)
This commit is contained in:
parent
ba6104d1e8
commit
37ebec3a95
1 changed files with 7 additions and 9 deletions
|
@ -155,20 +155,18 @@
|
||||||
(defcustom doc-view-ghostscript-program
|
(defcustom doc-view-ghostscript-program
|
||||||
(cond
|
(cond
|
||||||
((memq system-type '(windows-nt ms-dos))
|
((memq system-type '(windows-nt ms-dos))
|
||||||
(or
|
(cond
|
||||||
;; Windows Ghostscript
|
;; Windows Ghostscript
|
||||||
(executable-find "gswin64c")
|
((executable-find "gswin64c") "gswin64c")
|
||||||
(executable-find "gswin32c")
|
((executable-find "gswin32c") "gswin32c")
|
||||||
;; The GS wrapper coming with TeX Live
|
;; The GS wrapper coming with TeX Live
|
||||||
(executable-find "rungs")
|
((executable-find "rungs") "rungs")
|
||||||
;; The MikTeX builtin GS Check if mgs is functional for external
|
;; The MikTeX builtin GS Check if mgs is functional for external
|
||||||
;; non-MikTeX apps. Was available under:
|
;; non-MikTeX apps. Was available under:
|
||||||
;; http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx
|
;; http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx
|
||||||
(when-let ((mgs (executable-find "mgs")))
|
((and (executable-find "mgs")
|
||||||
(when (= 0 (shell-command
|
(= 0 (shell-command "mgs -q -dNODISPLAY -c quit")))
|
||||||
(concat (shell-quote-argument mgs)
|
"mgs")))
|
||||||
" -q -dNODISPLAY -c quit")))
|
|
||||||
mgs))))
|
|
||||||
(t "gs"))
|
(t "gs"))
|
||||||
"Program to convert PS and PDF files to PNG."
|
"Program to convert PS and PDF files to PNG."
|
||||||
:type 'file
|
:type 'file
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue