mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-21 21:20:44 -08:00
Fix a couple of doc-view user options
* lisp/doc-view.el (doc-view-pdf->png-converter-function): Fix placement and formatting of function-item :doc strings. (doc-view-odf->pdf-converter-program): Ditto. Tweak initialization logic to ensure initial value is non-nil and matches :type. Mention preferred executable soffice first. (doc-view-mode-p): Assume doc-view-odf->pdf-converter-program is always non-nil.
This commit is contained in:
parent
091b8de586
commit
50e913c956
1 changed files with 13 additions and 16 deletions
|
|
@ -204,10 +204,10 @@ are available (see Info node `(emacs)Document View')."
|
||||||
#'doc-view-pdf->png-converter-ghostscript)
|
#'doc-view-pdf->png-converter-ghostscript)
|
||||||
"Function to call to convert a PDF file into a PNG file."
|
"Function to call to convert a PDF file into a PNG file."
|
||||||
:type '(radio
|
:type '(radio
|
||||||
(function-item doc-view-pdf->png-converter-ghostscript
|
(function-item :doc "Use Ghostscript"
|
||||||
:doc "Use ghostscript")
|
doc-view-pdf->png-converter-ghostscript)
|
||||||
(function-item doc-view-pdf->png-converter-mupdf
|
(function-item :doc "Use MuPDF"
|
||||||
:doc "Use mupdf")
|
doc-view-pdf->png-converter-mupdf)
|
||||||
function)
|
function)
|
||||||
:version "24.4")
|
:version "24.4")
|
||||||
|
|
||||||
|
|
@ -375,17 +375,15 @@ Needed for viewing OpenOffice.org (and MS Office) files."
|
||||||
:type 'file)
|
:type 'file)
|
||||||
|
|
||||||
(defcustom doc-view-odf->pdf-converter-function
|
(defcustom doc-view-odf->pdf-converter-function
|
||||||
(cond
|
(if (string-suffix-p "unoconv" doc-view-odf->pdf-converter-program)
|
||||||
((string-match "unoconv\\'" doc-view-odf->pdf-converter-program)
|
#'doc-view-odf->pdf-converter-unoconv
|
||||||
#'doc-view-odf->pdf-converter-unoconv)
|
#'doc-view-odf->pdf-converter-soffice)
|
||||||
((string-match "soffice\\'" doc-view-odf->pdf-converter-program)
|
"Function to call to convert an ODF file into a PDF file."
|
||||||
#'doc-view-odf->pdf-converter-soffice))
|
|
||||||
"Function to call to convert a ODF file into a PDF file."
|
|
||||||
:type '(radio
|
:type '(radio
|
||||||
(function-item doc-view-odf->pdf-converter-unoconv
|
(function-item :doc "Use LibreOffice"
|
||||||
:doc "Use unoconv")
|
doc-view-odf->pdf-converter-soffice)
|
||||||
(function-item doc-view-odf->pdf-converter-soffice
|
(function-item :doc "Use unoconv"
|
||||||
:doc "Use LibreOffice")
|
doc-view-odf->pdf-converter-unoconv)
|
||||||
function)
|
function)
|
||||||
:version "24.4")
|
:version "24.4")
|
||||||
|
|
||||||
|
|
@ -940,8 +938,7 @@ Document types are symbols like `dvi', `ps', `pdf', `epub',
|
||||||
(and doc-view-pdfdraw-program
|
(and doc-view-pdfdraw-program
|
||||||
(executable-find doc-view-pdfdraw-program)))))
|
(executable-find doc-view-pdfdraw-program)))))
|
||||||
((eq type 'odf)
|
((eq type 'odf)
|
||||||
(and doc-view-odf->pdf-converter-program
|
(and (executable-find doc-view-odf->pdf-converter-program)
|
||||||
(executable-find doc-view-odf->pdf-converter-program)
|
|
||||||
(doc-view-mode-p 'pdf)))
|
(doc-view-mode-p 'pdf)))
|
||||||
((eq type 'djvu)
|
((eq type 'djvu)
|
||||||
(executable-find "ddjvu"))
|
(executable-find "ddjvu"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue