Mercurial > emacs
changeset 24330:fee8d10bbb21
(tex-run-command, latex-run-command)
(slitex-run-command, tex-command): Doc changes.
(tex-start-options-string): Autoload it. Doc change. Provide
a menu for customization. Allow nil. Quote backslashes only once.
(tex-start-tex): Handle nil value of tex-start-options-string
and apply shell-quote-argument to it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 16 Feb 1999 10:39:24 +0000 |
parents | 40be509c47c2 |
children | 84dcf9017a67 |
files | lisp/textmodes/tex-mode.el |
diffstat | 1 files changed, 28 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el Tue Feb 16 08:29:22 1999 +0000 +++ b/lisp/textmodes/tex-mode.el Tue Feb 16 10:39:24 1999 +0000 @@ -1,6 +1,6 @@ ;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands. -;; Copyright (C) 1985, 86, 89, 92, 94, 95, 96, 97, 1998 +;; Copyright (C) 1985, 86, 89, 92, 94, 95, 96, 97, 98, 1999 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -95,33 +95,36 @@ ;;;###autoload (defcustom tex-run-command "tex" "*Command used to run TeX subjob. -If this string contains an asterisk (`*'), that is replaced by the file name; -otherwise the value of `tex-start-options-string' and the file name are added -at the end, with blanks as separators." +TeX Mode sets `tex-command' to this string. +See the documentation of that variable." :type 'string :group 'tex-run) ;;;###autoload (defcustom latex-run-command "latex" "*Command used to run LaTeX subjob. -If this string contains an asterisk (`*'), that is replaced by the file name; -otherwise the value of `tex-start-options-string' and the file name are added -at the end, with blanks as separators." +LaTeX Mode sets `tex-command' to this string. +See the documentation of that variable." :type 'string :group 'tex-run) ;;;###autoload (defcustom slitex-run-command "slitex" "*Command used to run SliTeX subjob. -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." +SliTeX Mode sets `tex-command' to this string. +See the documentation of that variable." :type 'string :group 'tex-run) -(defcustom tex-start-options-string "\\\\nonstopmode\\\\input" +;;;###autoload +(defcustom tex-start-options-string "\\nonstopmode\\input" "*TeX options to use when running TeX. -These precede the input file name." - :type 'string +These precede the input file name. If nil, TeX runs without option. +See the documentation of `tex-command'." + :type '(radio (const :tag "Interactive \(nil\)" nil) + (const :tag "Nonstop \(\"\\nonstopmode\\input\"\)" + "\\nonstopmode\\input") + (string :tag "String at your choice")) :group 'tex-run :version "20.4") @@ -230,9 +233,14 @@ tex shell terminates.") (defvar tex-command nil - "Command to run TeX. -The usual values are `tex-run-command' and `latex-run-command'. -See the documentations of these variables.") + "*Command to run TeX. +If this string contains an asterisk \(`*'\), that is replaced by the file name\; +otherwise the \(shell-quoted\) value of `tex-start-options-string' and +the file name are added at the end, with blanks as separators. + +In TeX, LaTeX, and SliTeX Mode this variable becomes buffer local. +In these modes, use \\[set-variable] if you want to change it for the +current buffer.") (defvar tex-trailer nil "String appended after the end of a region sent to TeX by \\[tex-region].") @@ -449,6 +457,8 @@ ;;;###autoload (defalias 'TeX-mode 'tex-mode) ;;;###autoload +(defalias 'plain-TeX-mode 'plain-tex-mode) +;;;###autoload (defalias 'LaTeX-mode 'latex-mode) ;;;###autoload @@ -502,8 +512,6 @@ (setq tex-end-of-header "%\\*\\*end of header") (setq tex-trailer "\\bye\n") (run-hooks 'text-mode-hook 'tex-mode-hook 'plain-tex-mode-hook)) -;;;###autoload -(defalias 'plain-TeX-mode 'plain-tex-mode) ;;;###autoload (defun latex-mode () @@ -1102,7 +1110,9 @@ (comint-quote-filename file) (substring command (1+ star))) (concat command " " - (comint-quote-filename tex-start-options-string) " " + (if (< 0 (length tex-start-options-string)) + (concat + (shell-quote-argument tex-start-options-string) " ")) (comint-quote-filename file))))) (with-current-buffer (process-buffer (tex-send-command compile-command)) (save-excursion