aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-11-06 05:05:47 +0000
committerRichard M. Stallman2002-11-06 05:05:47 +0000
commit746c30e216a31e283b1bcf975b1da11c9f9b5bb4 (patch)
tree86b749ee354041550a60cea540b66d918d7523bf
parentbc4e60fc842855d91b46080ba133dba2213a2d21 (diff)
downloademacs-746c30e216a31e283b1bcf975b1da11c9f9b5bb4.tar.gz
emacs-746c30e216a31e283b1bcf975b1da11c9f9b5bb4.zip
(tex-dvi-view-command): Value can be sexp.
Initialize to a suitable sexp. (tex-view): Evaluate tex-dvi-view-command and use the value.
-rw-r--r--lisp/textmodes/tex-mode.el18
1 files changed, 6 insertions, 12 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index f051359143d..f3f7e9dc685 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -196,20 +196,14 @@ use."
196 :group 'tex-view) 196 :group 'tex-view)
197 197
198;;;###autoload 198;;;###autoload
199(defcustom tex-dvi-view-command nil 199(defcustom tex-dvi-view-command '(if (eq window-system 'x) \"xdvi\" \"dvi2tty * | cat -s\")
200 "*Command used by \\[tex-view] to display a `.dvi' file. 200 "*Command used by \\[tex-view] to display a `.dvi' file.
201If it is a string, that specifies the command directly.
201If this string contains an asterisk (`*'), that is replaced by the file name; 202If this string contains an asterisk (`*'), that is replaced by the file name;
202otherwise, the file name, preceded by blank, is added at the end. 203otherwise, the file name, preceded by a space, is added at the end.
203
204This can be set conditionally so that the previewer used is suitable for the
205window system being used. For example,
206
207 (setq tex-dvi-view-command
208 (if (eq window-system 'x) \"xdvi\" \"dvi2tty * | cat -s\"))
209 204
210would tell \\[tex-view] to use xdvi under X windows and to use dvi2tty 205If the value is a form, it is evaluated to get the command to use."
211otherwise." 206 :type '(choice (const nil) string sexp)
212 :type '(choice (const nil) string)
213 :group 'tex-view) 207 :group 'tex-view)
214 208
215;;;###autoload 209;;;###autoload
@@ -1800,7 +1794,7 @@ because there is no standard value that would generally work."
1800 (interactive) 1794 (interactive)
1801 (or tex-dvi-view-command 1795 (or tex-dvi-view-command
1802 (error "You must set `tex-dvi-view-command'")) 1796 (error "You must set `tex-dvi-view-command'"))
1803 (let ((tex-dvi-print-command tex-dvi-view-command)) 1797 (let ((tex-dvi-print-command (eval tex-dvi-view-command)))
1804 (tex-print))) 1798 (tex-print)))
1805 1799
1806(defun tex-append (file-name suffix) 1800(defun tex-append (file-name suffix)