changeset 23322:26cc35857be5

(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.
author Karl Heuer <kwzh@gnu.org>
date Fri, 25 Sep 1998 20:30:42 +0000
parents b352f37246ba
children 0800a4f84757
files lisp/textmodes/tex-mode.el
diffstat 1 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el	Fri Sep 25 17:04:24 1998 +0000
+++ b/lisp/textmodes/tex-mode.el	Fri Sep 25 20:30:42 1998 +0000
@@ -91,11 +91,12 @@
 (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 file name, preceded by blank, is added at the end."
+otherwise the value of tex-start-options-string and the file name are added
+at the end, with blanks as separators."
   :type 'string
   :group 'tex-run)
 
-(defcustom tex-start-options-string " \\\\nonstopmode\\\\input"
+(defcustom tex-start-options-string "\\nonstopmode\\input"
   "*TeX options to use when running TeX.
 These precede the input file name."
   :type 'string
@@ -1072,12 +1073,15 @@
 
 (defun tex-start-tex (command file)
   "Start a TeX run, using COMMAND on FILE."
-  (let* ((cmd (concat command tex-start-options-string))
-         (star (string-match "\\*" cmd))
+  (let* ((star (string-match "\\*" command))
          (compile-command
-          (if star (concat (substring cmd 0 star)
-                           file (substring cmd (1+ star)))
-            (concat cmd " " (comint-quote-filename file)))))
+          (if star
+	      (concat (substring command 0 star)
+		      (comint-quote-filename file)
+		      (substring command (1+ star)))
+            (concat command " "
+		    (comint-quote-filename tex-start-options-string) " "
+		    (comint-quote-filename file)))))
     (with-current-buffer (process-buffer (tex-send-command compile-command))
       (save-excursion
 	(forward-line -1)
@@ -1448,4 +1452,3 @@
 (provide 'tex-mode)
 
 ;;; tex-mode.el ends here
-