changeset 5087:a7b2df620d1a

(tex-start-shell): Don't use -v option. (tex-send-command): Insert text in the buffer, then use comint-send-input to send it.
author Richard M. Stallman <rms@gnu.org>
date Sat, 20 Nov 1993 22:00:55 +0000
parents 6e9634463e93
children 73a1b31b673f
files lisp/textmodes/tex-mode.el
diffstat 1 files changed, 15 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el	Sat Nov 20 09:44:27 1993 +0000
+++ b/lisp/textmodes/tex-mode.el	Sat Nov 20 22:00:55 1993 +0000
@@ -763,7 +763,7 @@
      (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 @@
       (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."