From 64db24613f8d8bbc1a3b976f6c84a4b67806cc37 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 23 Dec 1993 02:48:56 +0000 Subject: [PATCH] (tex-common-initialization): Make paragraph-start and paragraph-separate match a line of $$. (tex-send-command): New local var BUF. Use it when calling buffer-modified-tick. (tex-send-command): Switch to buffer before checking for subproc output in it. --- lisp/textmodes/tex-mode.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 1d2e20a223a..1f9ad2c51e3 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -463,7 +463,8 @@ Entering SliTeX mode calls the value of `text-mode-hook', then the value of (modify-syntax-entry ?' "w")) (set-syntax-table tex-mode-syntax-table)) (make-local-variable 'paragraph-start) - (setq paragraph-start "^[ \t]*$\\|^[\f\\\\%]") + ;; A line containing just $$ is treated as a paragraph separator. + (setq paragraph-start "^[ \t]*$\\|^[\f\\\\%]\\|^[ \t]*\\$\\$[ \t]*$") (make-local-variable 'paragraph-separate) (setq paragraph-separate paragraph-start) (make-local-variable 'comment-start) @@ -803,6 +804,7 @@ evaluates to a command string." (save-excursion (let* ((cmd (eval command)) (proc (get-process "tex-shell")) + (buf (process-buffer proc)) (star (string-match "\\*" cmd)) (string (concat @@ -812,15 +814,16 @@ evaluates to a command string." (concat cmd " " file)) cmd) (if background "&" "")))) + ;; Switch to buffer before checking for subproc output in it. + (set-buffer buf) ;; 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) + (if (= (buffer-modified-tick buf) tex-send-command-modified-tick) (accept-process-output proc)) - (set-buffer (process-buffer proc)) (goto-char (process-mark proc)) (insert string) (comint-send-input) - (setq tex-send-command-modified-tick (buffer-modified-tick))))) + (setq tex-send-command-modified-tick (buffer-modified-tick buf))))) (defun tex-delete-last-temp-files () "Delete any junk files from last temp file." -- 2.39.5