comparison lisp/textmodes/tex-mode.el @ 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 73a1b31b673f
children 3dd5ff54e1cd
comparison
equal deleted inserted replaced
5261:50406a868f05 5262:b3a689b41d39
461 (modify-syntax-entry ?@ "_") 461 (modify-syntax-entry ?@ "_")
462 (modify-syntax-entry ?~ " ") 462 (modify-syntax-entry ?~ " ")
463 (modify-syntax-entry ?' "w")) 463 (modify-syntax-entry ?' "w"))
464 (set-syntax-table tex-mode-syntax-table)) 464 (set-syntax-table tex-mode-syntax-table))
465 (make-local-variable 'paragraph-start) 465 (make-local-variable 'paragraph-start)
466 (setq paragraph-start "^[ \t]*$\\|^[\f\\\\%]") 466 ;; A line containing just $$ is treated as a paragraph separator.
467 (setq paragraph-start "^[ \t]*$\\|^[\f\\\\%]\\|^[ \t]*\\$\\$[ \t]*$")
467 (make-local-variable 'paragraph-separate) 468 (make-local-variable 'paragraph-separate)
468 (setq paragraph-separate paragraph-start) 469 (setq paragraph-separate paragraph-start)
469 (make-local-variable 'comment-start) 470 (make-local-variable 'comment-start)
470 (setq comment-start "%") 471 (setq comment-start "%")
471 (make-local-variable 'comment-start-skip) 472 (make-local-variable 'comment-start-skip)
801 substitution will be made in COMMAND. COMMAND can be any expression that 802 substitution will be made in COMMAND. COMMAND can be any expression that
802 evaluates to a command string." 803 evaluates to a command string."
803 (save-excursion 804 (save-excursion
804 (let* ((cmd (eval command)) 805 (let* ((cmd (eval command))
805 (proc (get-process "tex-shell")) 806 (proc (get-process "tex-shell"))
807 (buf (process-buffer proc))
806 (star (string-match "\\*" cmd)) 808 (star (string-match "\\*" cmd))
807 (string 809 (string
808 (concat 810 (concat
809 (if file 811 (if file
810 (if star (concat (substring cmd 0 star) 812 (if star (concat (substring cmd 0 star)
811 file (substring cmd (1+ star))) 813 file (substring cmd (1+ star)))
812 (concat cmd " " file)) 814 (concat cmd " " file))
813 cmd) 815 cmd)
814 (if background "&" "")))) 816 (if background "&" ""))))
817 ;; Switch to buffer before checking for subproc output in it.
818 (set-buffer buf)
815 ;; If text is unchanged since previous tex-send-command, 819 ;; If text is unchanged since previous tex-send-command,
816 ;; we haven't got any output. So wait for output now. 820 ;; we haven't got any output. So wait for output now.
817 (if (= (buffer-modified-tick) tex-send-command-modified-tick) 821 (if (= (buffer-modified-tick buf) tex-send-command-modified-tick)
818 (accept-process-output proc)) 822 (accept-process-output proc))
819 (set-buffer (process-buffer proc))
820 (goto-char (process-mark proc)) 823 (goto-char (process-mark proc))
821 (insert string) 824 (insert string)
822 (comint-send-input) 825 (comint-send-input)
823 (setq tex-send-command-modified-tick (buffer-modified-tick))))) 826 (setq tex-send-command-modified-tick (buffer-modified-tick buf)))))
824 827
825 (defun tex-delete-last-temp-files () 828 (defun tex-delete-last-temp-files ()
826 "Delete any junk files from last temp file." 829 "Delete any junk files from last temp file."
827 (if tex-last-temp-file 830 (if tex-last-temp-file
828 (let* ((dir (file-name-directory tex-last-temp-file)) 831 (let* ((dir (file-name-directory tex-last-temp-file))