comparison lisp/textmodes/tex-mode.el @ 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 4fe2d7d673cb
children 62a7f47017b3
comparison
equal deleted inserted replaced
23321:b352f37246ba 23322:26cc35857be5
89 89
90 ;;;###autoload 90 ;;;###autoload
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
102 :group 'tex-run 103 :group 'tex-run
103 :version "20.4") 104 :version "20.4")
1070 (defvar tex-start-tex-marker nil 1071 (defvar tex-start-tex-marker nil
1071 "Marker pointing after last TeX-running command in the TeX shell buffer.") 1072 "Marker pointing after last TeX-running command in the TeX shell buffer.")
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)
1084 (setq tex-start-tex-marker (point-marker))) 1088 (setq tex-start-tex-marker (point-marker)))
1085 (make-local-variable 'compilation-parse-errors-function) 1089 (make-local-variable 'compilation-parse-errors-function)
1446 (run-hooks 'tex-mode-load-hook) 1450 (run-hooks 'tex-mode-load-hook)
1447 1451
1448 (provide 'tex-mode) 1452 (provide 'tex-mode)
1449 1453
1450 ;;; tex-mode.el ends here 1454 ;;; tex-mode.el ends here
1451