# HG changeset patch # User Richard M. Stallman # Date 1036559147 0 # Node ID a65d281d19f0dd1d65e5aa66e64609eff52a36c6 # Parent d2c93bc1faf1eee0fbff24964b19817e1d171877 (tex-dvi-view-command): Value can be sexp. Initialize to a suitable sexp. (tex-view): Evaluate tex-dvi-view-command and use the value. diff -r d2c93bc1faf1 -r a65d281d19f0 lisp/textmodes/tex-mode.el --- a/lisp/textmodes/tex-mode.el Wed Nov 06 05:03:33 2002 +0000 +++ b/lisp/textmodes/tex-mode.el Wed Nov 06 05:05:47 2002 +0000 @@ -196,20 +196,14 @@ :group 'tex-view) ;;;###autoload -(defcustom tex-dvi-view-command nil +(defcustom tex-dvi-view-command '(if (eq window-system 'x) \"xdvi\" \"dvi2tty * | cat -s\") "*Command used by \\[tex-view] to display a `.dvi' file. +If it is a string, that specifies the command directly. If this string contains an asterisk (`*'), that is replaced by the file name; -otherwise, the file name, preceded by blank, is added at the end. +otherwise, the file name, preceded by a space, is added at the end. -This can be set conditionally so that the previewer used is suitable for the -window system being used. For example, - - (setq tex-dvi-view-command - (if (eq window-system 'x) \"xdvi\" \"dvi2tty * | cat -s\")) - -would tell \\[tex-view] to use xdvi under X windows and to use dvi2tty -otherwise." - :type '(choice (const nil) string) +If the value is a form, it is evaluated to get the command to use." + :type '(choice (const nil) string sexp) :group 'tex-view) ;;;###autoload @@ -1800,7 +1794,7 @@ (interactive) (or tex-dvi-view-command (error "You must set `tex-dvi-view-command'")) - (let ((tex-dvi-print-command tex-dvi-view-command)) + (let ((tex-dvi-print-command (eval tex-dvi-view-command))) (tex-print))) (defun tex-append (file-name suffix)