diff options
| author | Tassilo Horn | 2020-04-23 18:25:07 +0200 |
|---|---|---|
| committer | Tassilo Horn | 2020-04-23 18:25:07 +0200 |
| commit | 37ebec3a95cecd970c578e1955c940b3ad9f4e56 (patch) | |
| tree | 5ae757f111865a4fbe15b04ed7138ba6f374d61f | |
| parent | ba6104d1e8db4e8db2f12acaebf092ef579c6632 (diff) | |
| download | emacs-37ebec3a95cecd970c578e1955c940b3ad9f4e56.tar.gz emacs-37ebec3a95cecd970c578e1955c940b3ad9f4e56.zip | |
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)
| -rw-r--r-- | lisp/doc-view.el | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 714fdf8b088..171a939d4ec 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -155,20 +155,18 @@ | |||
| 155 | (defcustom doc-view-ghostscript-program | 155 | (defcustom doc-view-ghostscript-program |
| 156 | (cond | 156 | (cond |
| 157 | ((memq system-type '(windows-nt ms-dos)) | 157 | ((memq system-type '(windows-nt ms-dos)) |
| 158 | (or | 158 | (cond |
| 159 | ;; Windows Ghostscript | 159 | ;; Windows Ghostscript |
| 160 | (executable-find "gswin64c") | 160 | ((executable-find "gswin64c") "gswin64c") |
| 161 | (executable-find "gswin32c") | 161 | ((executable-find "gswin32c") "gswin32c") |
| 162 | ;; The GS wrapper coming with TeX Live | 162 | ;; The GS wrapper coming with TeX Live |
| 163 | (executable-find "rungs") | 163 | ((executable-find "rungs") "rungs") |
| 164 | ;; The MikTeX builtin GS Check if mgs is functional for external | 164 | ;; The MikTeX builtin GS Check if mgs is functional for external |
| 165 | ;; non-MikTeX apps. Was available under: | 165 | ;; non-MikTeX apps. Was available under: |
| 166 | ;; http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx | 166 | ;; http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx |
| 167 | (when-let ((mgs (executable-find "mgs"))) | 167 | ((and (executable-find "mgs") |
| 168 | (when (= 0 (shell-command | 168 | (= 0 (shell-command "mgs -q -dNODISPLAY -c quit"))) |
| 169 | (concat (shell-quote-argument mgs) | 169 | "mgs"))) |
| 170 | " -q -dNODISPLAY -c quit"))) | ||
| 171 | mgs)))) | ||
| 172 | (t "gs")) | 170 | (t "gs")) |
| 173 | "Program to convert PS and PDF files to PNG." | 171 | "Program to convert PS and PDF files to PNG." |
| 174 | :type 'file | 172 | :type 'file |