]> git.eshelyaron.com Git - emacs.git/commitdiff
(tex-start-shell): Don't use -v option.
authorRichard M. Stallman <rms@gnu.org>
Sat, 20 Nov 1993 22:00:55 +0000 (22:00 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 20 Nov 1993 22:00:55 +0000 (22:00 +0000)
(tex-send-command): Insert text in the buffer, then use
comint-send-input to send it.

lisp/textmodes/tex-mode.el

index f91245c81d63af8abd2cc168dd7d8d462b0e7b96..eddf642468f268e29525ebee1b18dc261ccf4f74 100644 (file)
@@ -763,7 +763,7 @@ line numbers for the errors."
      (make-comint
       "tex-shell"
       (or tex-shell-file-name (getenv "ESHELL") (getenv "SHELL") "/bin/sh")
-      nil "-v"))
+      nil))
     (let ((proc (get-process "tex-shell")))
       (set-process-sentinel proc 'tex-shell-sentinel)
       (process-kill-without-query proc)
@@ -792,22 +792,27 @@ line numbers for the errors."
       (setq default-directory directory))))
 
 (defun tex-send-command (command &optional file background)
-  "Send COMMAND to tex-shell, substituting optional FILE for *.
+  "Send COMMAND to TeX shell process, substituting optional FILE for *.
 Do this in background if optional BACKGROUND is t.  If COMMAND has no *,
 FILE will be appended, preceded by a blank, to COMMAND.  If FILE is nil, no
 substitution will be made in COMMAND.  COMMAND can be any expression that
 evaluates to a command string."
   (save-excursion
     (let* ((cmd (eval command))
+          (proc (get-process "tex-shell"))
            (star (string-match "\\*" cmd))
-           (front (substring cmd 0 star))
-           (back (if star (substring cmd (1+ star)) "")))
-      (comint-proc-query (get-process "tex-shell")
-                         (concat
-                          (if file (if star (concat front file back)
-                                     (concat cmd " " file))
-                            cmd)
-                          (if background "&\n" "\n"))))))
+          (string
+           (concat
+            (if file
+                (if star (concat (substring cmd 0 star)
+                                 file (substring cmd (1+ star)))
+                  (concat cmd " " file))
+              cmd)
+            (if background "&" ""))))
+      (set-buffer (process-buffer proc))
+      (goto-char (process-mark proc))
+      (insert string)
+      (comint-send-input))))
 
 (defun tex-delete-last-temp-files ()
   "Delete any junk files from last temp file."