summaryrefslogtreecommitdiff
path: root/lisp/textmodes/tex-mode.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-11-20 22:21:30 +0000
committerRichard M. Stallman <rms@gnu.org>1993-11-20 22:21:30 +0000
commitc0c72dd27d50fdd8b0992e5c7b31b9b8b57c68a8 (patch)
tree5e3eada5c12514deda92dbc320a86053cb2daa15 /lisp/textmodes/tex-mode.el
parent5ab97383febda84de212deb280792f3ed9874d86 (diff)
downloademacs-c0c72dd27d50fdd8b0992e5c7b31b9b8b57c68a8.tar.gz
(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.
Diffstat (limited to 'lisp/textmodes/tex-mode.el')
-rw-r--r--lisp/textmodes/tex-mode.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index eddf642468f..1d2e20a223a 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -791,6 +791,9 @@ line numbers for the errors."
(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 @@ evaluates to a command string."
(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."