diff options
| author | Richard M. Stallman | 1993-11-20 22:21:30 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-11-20 22:21:30 +0000 |
| commit | 30803a05ce0c34bc09196b748e4d50bce73df7eb (patch) | |
| tree | 91059a93aeda1582c099cf29d27a5ee554f7f46d | |
| parent | 4cdc1d4b2d56076be98b797b3fa10afed817bcec (diff) | |
| download | emacs-30803a05ce0c34bc09196b748e4d50bce73df7eb.tar.gz emacs-30803a05ce0c34bc09196b748e4d50bce73df7eb.zip | |
(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.
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 10 |
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." | |||
| 791 | (set-buffer buffer) | 791 | (set-buffer buffer) |
| 792 | (setq default-directory directory)))) | 792 | (setq default-directory directory)))) |
| 793 | 793 | ||
| 794 | (defvar tex-send-command-modified-tick 0) | ||
| 795 | (make-variable-buffer-local 'tex-send-command-modified-tick) | ||
| 796 | |||
| 794 | (defun tex-send-command (command &optional file background) | 797 | (defun tex-send-command (command &optional file background) |
| 795 | "Send COMMAND to TeX shell process, substituting optional FILE for *. | 798 | "Send COMMAND to TeX shell process, substituting optional FILE for *. |
| 796 | Do this in background if optional BACKGROUND is t. If COMMAND has no *, | 799 | Do this in background if optional BACKGROUND is t. If COMMAND has no *, |
| @@ -809,10 +812,15 @@ evaluates to a command string." | |||
| 809 | (concat cmd " " file)) | 812 | (concat cmd " " file)) |
| 810 | cmd) | 813 | cmd) |
| 811 | (if background "&" "")))) | 814 | (if background "&" "")))) |
| 815 | ;; If text is unchanged since previous tex-send-command, | ||
| 816 | ;; we haven't got any output. So wait for output now. | ||
| 817 | (if (= (buffer-modified-tick) tex-send-command-modified-tick) | ||
| 818 | (accept-process-output proc)) | ||
| 812 | (set-buffer (process-buffer proc)) | 819 | (set-buffer (process-buffer proc)) |
| 813 | (goto-char (process-mark proc)) | 820 | (goto-char (process-mark proc)) |
| 814 | (insert string) | 821 | (insert string) |
| 815 | (comint-send-input)))) | 822 | (comint-send-input) |
| 823 | (setq tex-send-command-modified-tick (buffer-modified-tick))))) | ||
| 816 | 824 | ||
| 817 | (defun tex-delete-last-temp-files () | 825 | (defun tex-delete-last-temp-files () |
| 818 | "Delete any junk files from last temp file." | 826 | "Delete any junk files from last temp file." |