changeset 5088:73a1b31b673f

(tex-send-command): Wait for output first, if text has not changed since previous tex-send-command. (tex-send-command-modified-tick): New buffer-local variable.
author Richard M. Stallman <rms@gnu.org>
date Sat, 20 Nov 1993 22:21:30 +0000
parents a7b2df620d1a
children 25c2db35fe1e
files lisp/textmodes/tex-mode.el
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el	Sat Nov 20 22:00:55 1993 +0000
+++ b/lisp/textmodes/tex-mode.el	Sat Nov 20 22:21:30 1993 +0000
@@ -791,6 +791,9 @@
       (set-buffer buffer)
       (setq default-directory directory))))
 
+(defvar tex-send-command-modified-tick 0)
+(make-variable-buffer-local 'tex-send-command-modified-tick)
+
 (defun tex-send-command (command &optional file background)
   "Send COMMAND to TeX shell process, substituting optional FILE for *.
 Do this in background if optional BACKGROUND is t.  If COMMAND has no *,
@@ -809,10 +812,15 @@
 		   (concat cmd " " file))
 	       cmd)
 	     (if background "&" ""))))
+      ;; If text is unchanged since previous tex-send-command,
+      ;; we haven't got any output.  So wait for output now.
+      (if (= (buffer-modified-tick) tex-send-command-modified-tick)
+	  (accept-process-output proc))
       (set-buffer (process-buffer proc))
       (goto-char (process-mark proc))
       (insert string)
-      (comint-send-input))))
+      (comint-send-input)
+      (setq tex-send-command-modified-tick (buffer-modified-tick)))))
 
 (defun tex-delete-last-temp-files ()
   "Delete any junk files from last temp file."