diff options
| author | Karl Heuer | 1998-09-25 20:30:42 +0000 |
|---|---|---|
| committer | Karl Heuer | 1998-09-25 20:30:42 +0000 |
| commit | 6633b89142b4bff84084a9a2c0865f69d219ef79 (patch) | |
| tree | ce3752681b6b57dc2469664c4c51627df428e49d /lisp | |
| parent | dfba24679712b24e0a5d20a0bf6db4ef0d31dc9d (diff) | |
| download | emacs-6633b89142b4bff84084a9a2c0865f69d219ef79.tar.gz emacs-6633b89142b4bff84084a9a2c0865f69d219ef79.zip | |
(tex-run-command): Doc fix.
(tex-start-tex): Don't use tex-start-options-string in star case.
Quote file name in star case as well as in non-star.
Add blank and quoting of option string here.
(tex-start-options-string): Not here.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 988cc75e5da..dc275bc5938 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -91,11 +91,12 @@ if the variable is non-nil." | |||
| 91 | (defcustom tex-run-command "tex" | 91 | (defcustom tex-run-command "tex" |
| 92 | "*Command used to run TeX subjob. | 92 | "*Command used to run TeX subjob. |
| 93 | If this string contains an asterisk (`*'), that is replaced by the file name; | 93 | If this string contains an asterisk (`*'), that is replaced by the file name; |
| 94 | otherwise, the file name, preceded by blank, is added at the end." | 94 | otherwise the value of tex-start-options-string and the file name are added |
| 95 | at the end, with blanks as separators." | ||
| 95 | :type 'string | 96 | :type 'string |
| 96 | :group 'tex-run) | 97 | :group 'tex-run) |
| 97 | 98 | ||
| 98 | (defcustom tex-start-options-string " \\\\nonstopmode\\\\input" | 99 | (defcustom tex-start-options-string "\\nonstopmode\\input" |
| 99 | "*TeX options to use when running TeX. | 100 | "*TeX options to use when running TeX. |
| 100 | These precede the input file name." | 101 | These precede the input file name." |
| 101 | :type 'string | 102 | :type 'string |
| @@ -1072,12 +1073,15 @@ If NOT-ALL is non-nil, save the `.dvi' file." | |||
| 1072 | 1073 | ||
| 1073 | (defun tex-start-tex (command file) | 1074 | (defun tex-start-tex (command file) |
| 1074 | "Start a TeX run, using COMMAND on FILE." | 1075 | "Start a TeX run, using COMMAND on FILE." |
| 1075 | (let* ((cmd (concat command tex-start-options-string)) | 1076 | (let* ((star (string-match "\\*" command)) |
| 1076 | (star (string-match "\\*" cmd)) | ||
| 1077 | (compile-command | 1077 | (compile-command |
| 1078 | (if star (concat (substring cmd 0 star) | 1078 | (if star |
| 1079 | file (substring cmd (1+ star))) | 1079 | (concat (substring command 0 star) |
| 1080 | (concat cmd " " (comint-quote-filename file))))) | 1080 | (comint-quote-filename file) |
| 1081 | (substring command (1+ star))) | ||
| 1082 | (concat command " " | ||
| 1083 | (comint-quote-filename tex-start-options-string) " " | ||
| 1084 | (comint-quote-filename file))))) | ||
| 1081 | (with-current-buffer (process-buffer (tex-send-command compile-command)) | 1085 | (with-current-buffer (process-buffer (tex-send-command compile-command)) |
| 1082 | (save-excursion | 1086 | (save-excursion |
| 1083 | (forward-line -1) | 1087 | (forward-line -1) |
| @@ -1448,4 +1452,3 @@ Runs the shell command defined by `tex-show-queue-command'." | |||
| 1448 | (provide 'tex-mode) | 1452 | (provide 'tex-mode) |
| 1449 | 1453 | ||
| 1450 | ;;; tex-mode.el ends here | 1454 | ;;; tex-mode.el ends here |
| 1451 | |||