diff options
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 7a7511c5c17..1f248699758 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands. | 1 | ;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 86, 89, 92, 94, 95, 96, 97, 1998 | 3 | ;; Copyright (C) 1985, 86, 89, 92, 94, 95, 96, 97, 98, 1999 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -95,33 +95,36 @@ if the variable is non-nil." | |||
| 95 | ;;;###autoload | 95 | ;;;###autoload |
| 96 | (defcustom tex-run-command "tex" | 96 | (defcustom tex-run-command "tex" |
| 97 | "*Command used to run TeX subjob. | 97 | "*Command used to run TeX subjob. |
| 98 | If this string contains an asterisk (`*'), that is replaced by the file name; | 98 | TeX Mode sets `tex-command' to this string. |
| 99 | otherwise the value of `tex-start-options-string' and the file name are added | 99 | See the documentation of that variable." |
| 100 | at the end, with blanks as separators." | ||
| 101 | :type 'string | 100 | :type 'string |
| 102 | :group 'tex-run) | 101 | :group 'tex-run) |
| 103 | 102 | ||
| 104 | ;;;###autoload | 103 | ;;;###autoload |
| 105 | (defcustom latex-run-command "latex" | 104 | (defcustom latex-run-command "latex" |
| 106 | "*Command used to run LaTeX subjob. | 105 | "*Command used to run LaTeX subjob. |
| 107 | If this string contains an asterisk (`*'), that is replaced by the file name; | 106 | LaTeX Mode sets `tex-command' to this string. |
| 108 | otherwise the value of `tex-start-options-string' and the file name are added | 107 | See the documentation of that variable." |
| 109 | at the end, with blanks as separators." | ||
| 110 | :type 'string | 108 | :type 'string |
| 111 | :group 'tex-run) | 109 | :group 'tex-run) |
| 112 | 110 | ||
| 113 | ;;;###autoload | 111 | ;;;###autoload |
| 114 | (defcustom slitex-run-command "slitex" | 112 | (defcustom slitex-run-command "slitex" |
| 115 | "*Command used to run SliTeX subjob. | 113 | "*Command used to run SliTeX subjob. |
| 116 | If this string contains an asterisk (`*'), that is replaced by the file name; | 114 | SliTeX Mode sets `tex-command' to this string. |
| 117 | otherwise, the file name, preceded by blank, is added at the end." | 115 | See the documentation of that variable." |
| 118 | :type 'string | 116 | :type 'string |
| 119 | :group 'tex-run) | 117 | :group 'tex-run) |
| 120 | 118 | ||
| 121 | (defcustom tex-start-options-string "\\\\nonstopmode\\\\input" | 119 | ;;;###autoload |
| 120 | (defcustom tex-start-options-string "\\nonstopmode\\input" | ||
| 122 | "*TeX options to use when running TeX. | 121 | "*TeX options to use when running TeX. |
| 123 | These precede the input file name." | 122 | These precede the input file name. If nil, TeX runs without option. |
| 124 | :type 'string | 123 | See the documentation of `tex-command'." |
| 124 | :type '(radio (const :tag "Interactive \(nil\)" nil) | ||
| 125 | (const :tag "Nonstop \(\"\\nonstopmode\\input\"\)" | ||
| 126 | "\\nonstopmode\\input") | ||
| 127 | (string :tag "String at your choice")) | ||
| 125 | :group 'tex-run | 128 | :group 'tex-run |
| 126 | :version "20.4") | 129 | :version "20.4") |
| 127 | 130 | ||
| @@ -230,9 +233,14 @@ Deleted when the \\[tex-region] or \\[tex-buffer] is next run, or when the | |||
| 230 | tex shell terminates.") | 233 | tex shell terminates.") |
| 231 | 234 | ||
| 232 | (defvar tex-command nil | 235 | (defvar tex-command nil |
| 233 | "Command to run TeX. | 236 | "*Command to run TeX. |
| 234 | The usual values are `tex-run-command' and `latex-run-command'. | 237 | If this string contains an asterisk \(`*'\), that is replaced by the file name\; |
| 235 | See the documentations of these variables.") | 238 | otherwise the \(shell-quoted\) value of `tex-start-options-string' and |
| 239 | the file name are added at the end, with blanks as separators. | ||
| 240 | |||
| 241 | In TeX, LaTeX, and SliTeX Mode this variable becomes buffer local. | ||
| 242 | In these modes, use \\[set-variable] if you want to change it for the | ||
| 243 | current buffer.") | ||
| 236 | 244 | ||
| 237 | (defvar tex-trailer nil | 245 | (defvar tex-trailer nil |
| 238 | "String appended after the end of a region sent to TeX by \\[tex-region].") | 246 | "String appended after the end of a region sent to TeX by \\[tex-region].") |
| @@ -449,6 +457,8 @@ says which mode to use." | |||
| 449 | ;;;###autoload | 457 | ;;;###autoload |
| 450 | (defalias 'TeX-mode 'tex-mode) | 458 | (defalias 'TeX-mode 'tex-mode) |
| 451 | ;;;###autoload | 459 | ;;;###autoload |
| 460 | (defalias 'plain-TeX-mode 'plain-tex-mode) | ||
| 461 | ;;;###autoload | ||
| 452 | (defalias 'LaTeX-mode 'latex-mode) | 462 | (defalias 'LaTeX-mode 'latex-mode) |
| 453 | 463 | ||
| 454 | ;;;###autoload | 464 | ;;;###autoload |
| @@ -502,8 +512,6 @@ special subshell is initiated, the hook `tex-shell-hook' is run." | |||
| 502 | (setq tex-end-of-header "%\\*\\*end of header") | 512 | (setq tex-end-of-header "%\\*\\*end of header") |
| 503 | (setq tex-trailer "\\bye\n") | 513 | (setq tex-trailer "\\bye\n") |
| 504 | (run-hooks 'text-mode-hook 'tex-mode-hook 'plain-tex-mode-hook)) | 514 | (run-hooks 'text-mode-hook 'tex-mode-hook 'plain-tex-mode-hook)) |
| 505 | ;;;###autoload | ||
| 506 | (defalias 'plain-TeX-mode 'plain-tex-mode) | ||
| 507 | 515 | ||
| 508 | ;;;###autoload | 516 | ;;;###autoload |
| 509 | (defun latex-mode () | 517 | (defun latex-mode () |
| @@ -1102,7 +1110,9 @@ If NOT-ALL is non-nil, save the `.dvi' file." | |||
| 1102 | (comint-quote-filename file) | 1110 | (comint-quote-filename file) |
| 1103 | (substring command (1+ star))) | 1111 | (substring command (1+ star))) |
| 1104 | (concat command " " | 1112 | (concat command " " |
| 1105 | (comint-quote-filename tex-start-options-string) " " | 1113 | (if (< 0 (length tex-start-options-string)) |
| 1114 | (concat | ||
| 1115 | (shell-quote-argument tex-start-options-string) " ")) | ||
| 1106 | (comint-quote-filename file))))) | 1116 | (comint-quote-filename file))))) |
| 1107 | (with-current-buffer (process-buffer (tex-send-command compile-command)) | 1117 | (with-current-buffer (process-buffer (tex-send-command compile-command)) |
| 1108 | (save-excursion | 1118 | (save-excursion |