Commit d0af9f77 authored by Stefan Monnier's avatar Stefan Monnier

* lisp/doc-view.el: Avoid ugly errors about not finding nil.

(doc-view-ghostscript-program, doc-view-dvipdfm-program)
(doc-view-dvipdf-program, doc-view-unoconv-program)
(doc-view-ps2pdf-program, doc-view-pdftotext-program):
Avoid nil or absolute file name as default value.
(doc-view-pdf->txt, doc-view-ps->pdf): Use executable-find here.
parent 83ed7b5c
2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
* doc-view.el: Avoid ugly errors about not finding nil.
(doc-view-ghostscript-program, doc-view-dvipdfm-program)
(doc-view-dvipdf-program, doc-view-unoconv-program)
(doc-view-ps2pdf-program, doc-view-pdftotext-program):
Avoid nil or absolute file name as default value.
(doc-view-pdf->txt, doc-view-ps->pdf): Use executable-find here.
2011-10-28 Alan Mackenzie <acm@muc.de> 2011-10-28 Alan Mackenzie <acm@muc.de>
* progmodes/cc-defs.el (c-version). -> 5.32.2. * progmodes/cc-defs.el (c-version). -> 5.32.2.
...@@ -14,8 +23,8 @@ ...@@ -14,8 +23,8 @@
cc-vars.el. cc-vars.el.
(c-nonlabel-token-2-key): New variable for change in cc-engine.el. (c-nonlabel-token-2-key): New variable for change in cc-engine.el.
* progmodes/cc-engine.el (c-beginning-of-statement-1): Prevent * progmodes/cc-engine.el (c-beginning-of-statement-1):
"class foo : bar" being spuriously recognized as a label. Prevent "class foo : bar" being spuriously recognized as a label.
* progmodes/cc-cmds.el (c-narrow-to-most-enclosing-decl-block): * progmodes/cc-cmds.el (c-narrow-to-most-enclosing-decl-block):
Add parameter `inclusive' (to include enclosing braces in the Add parameter `inclusive' (to include enclosing braces in the
...@@ -39,8 +48,8 @@ ...@@ -39,8 +48,8 @@
* progmodes/cc-defs.el: Update "virtual semicolon" comments. * progmodes/cc-defs.el: Update "virtual semicolon" comments.
* progmodes/cc-engine.el (c-crosses-statement-barrier-p): Recoded * progmodes/cc-engine.el (c-crosses-statement-barrier-p):
to scan one line at at time rather than having \n and \r Recoded to scan one line at at time rather than having \n and \r
explicitly in c-stmt-delim-chars explicitly in c-stmt-delim-chars
(for some modes, e.g. AWK). (for some modes, e.g. AWK).
(c-forward-label): Amend for virtual semicolons. (c-forward-label): Amend for virtual semicolons.
...@@ -56,8 +65,8 @@ ...@@ -56,8 +65,8 @@
(c-stmt-delim-chars, c-stmt-delim-chars-with-comma): Special value for (c-stmt-delim-chars, c-stmt-delim-chars-with-comma): Special value for
AWK Mode (including \n, \r) removed, no longer needed. AWK Mode (including \n, \r) removed, no longer needed.
* progmodes/cc-mode.el (c-mode, c++-mode, objc-mode): Invoke * progmodes/cc-mode.el (c-mode, c++-mode, objc-mode):
c-make-macro-with-semi-re. Invoke c-make-macro-with-semi-re.
* progmodes/cc-vars.el (c-macro-with-semi-re): * progmodes/cc-vars.el (c-macro-with-semi-re):
(c-macro-names-with-semicolon): New variables. (c-macro-names-with-semicolon): New variables.
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
:group 'multimedia :group 'multimedia
:prefix "doc-view-") :prefix "doc-view-")
(defcustom doc-view-ghostscript-program (executable-find "gs") (defcustom doc-view-ghostscript-program "gs"
"Program to convert PS and PDF files to PNG." "Program to convert PS and PDF files to PNG."
:type 'file :type 'file
:group 'doc-view) :group 'doc-view)
...@@ -175,7 +175,7 @@ Has only an effect if imagemagick support is compiled into emacs." ...@@ -175,7 +175,7 @@ Has only an effect if imagemagick support is compiled into emacs."
:type 'number :type 'number
:group 'doc-view) :group 'doc-view)
(defcustom doc-view-dvipdfm-program (executable-find "dvipdfm") (defcustom doc-view-dvipdfm-program "dvipdfm"
"Program to convert DVI files to PDF. "Program to convert DVI files to PDF.
DVI file will be converted to PDF before the resulting PDF is DVI file will be converted to PDF before the resulting PDF is
...@@ -186,7 +186,7 @@ If this and `doc-view-dvipdf-program' are set, ...@@ -186,7 +186,7 @@ If this and `doc-view-dvipdf-program' are set,
:type 'file :type 'file
:group 'doc-view) :group 'doc-view)
(defcustom doc-view-dvipdf-program (executable-find "dvipdf") (defcustom doc-view-dvipdf-program "dvipdf"
"Program to convert DVI files to PDF. "Program to convert DVI files to PDF.
DVI file will be converted to PDF before the resulting PDF is DVI file will be converted to PDF before the resulting PDF is
...@@ -197,21 +197,21 @@ If this and `doc-view-dvipdfm-program' are set, ...@@ -197,21 +197,21 @@ If this and `doc-view-dvipdfm-program' are set,
:type 'file :type 'file
:group 'doc-view) :group 'doc-view)
(defcustom doc-view-unoconv-program (executable-find "unoconv") (defcustom doc-view-unoconv-program "unoconv"
"Program to convert any file type readable by OpenOffice.org to PDF. "Program to convert any file type readable by OpenOffice.org to PDF.
Needed for viewing OpenOffice.org (and MS Office) files." Needed for viewing OpenOffice.org (and MS Office) files."
:type 'file :type 'file
:group 'doc-view) :group 'doc-view)
(defcustom doc-view-ps2pdf-program (executable-find "ps2pdf") (defcustom doc-view-ps2pdf-program "ps2pdf"
"Program to convert PS files to PDF. "Program to convert PS files to PDF.
PS files will be converted to PDF before searching is possible." PS files will be converted to PDF before searching is possible."
:type 'file :type 'file
:group 'doc-view) :group 'doc-view)
(defcustom doc-view-pdftotext-program (executable-find "pdftotext") (defcustom doc-view-pdftotext-program "pdftotext"
"Program to convert PDF files to plain text. "Program to convert PDF files to plain text.
Needed for searching." Needed for searching."
...@@ -881,7 +881,7 @@ Start by converting PAGES, and then the rest." ...@@ -881,7 +881,7 @@ Start by converting PAGES, and then the rest."
(defun doc-view-pdf->txt (pdf txt callback) (defun doc-view-pdf->txt (pdf txt callback)
"Convert PDF to TXT asynchronously and call CALLBACK when finished." "Convert PDF to TXT asynchronously and call CALLBACK when finished."
(or doc-view-pdftotext-program (or (executable-find doc-view-pdftotext-program)
(error "You need the `pdftotext' program to convert a PDF to text")) (error "You need the `pdftotext' program to convert a PDF to text"))
(doc-view-start-process "pdf->txt" doc-view-pdftotext-program (doc-view-start-process "pdf->txt" doc-view-pdftotext-program
(list "-raw" pdf txt) (list "-raw" pdf txt)
...@@ -917,7 +917,7 @@ Start by converting PAGES, and then the rest." ...@@ -917,7 +917,7 @@ Start by converting PAGES, and then the rest."
(defun doc-view-ps->pdf (ps pdf callback) (defun doc-view-ps->pdf (ps pdf callback)
"Convert PS to PDF asynchronously and call CALLBACK when finished." "Convert PS to PDF asynchronously and call CALLBACK when finished."
(or doc-view-ps2pdf-program (or (executable-find doc-view-ps2pdf-program)
(error "You need the `ps2pdf' program to convert PS to PDF")) (error "You need the `ps2pdf' program to convert PS to PDF"))
(doc-view-start-process "ps->pdf" doc-view-ps2pdf-program (doc-view-start-process "ps->pdf" doc-view-ps2pdf-program
(list (list
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment