changeset 5262:b3a689b41d39

(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.
author Richard M. Stallman <rms@gnu.org>
date Thu, 23 Dec 1993 02:48:56 +0000
parents 50406a868f05
children f12548cb6e0b
files lisp/textmodes/tex-mode.el
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el	Thu Dec 23 02:45:28 1993 +0000
+++ b/lisp/textmodes/tex-mode.el	Thu Dec 23 02:48:56 1993 +0000
@@ -463,7 +463,8 @@
 	(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 @@
   (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 @@
 		   (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."