changeset 54423:802a91a2e43a

(tex-shell): Set error parsing function here. (tex-send-tex-command): Rather than here. (tex-compilation-parse-errors): Simplify.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 18 Mar 2004 20:26:01 +0000
parents 4f7b9dbf832e
children 6ea174960a93
files lisp/textmodes/tex-mode.el
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el	Thu Mar 18 19:29:33 2004 +0000
+++ b/lisp/textmodes/tex-mode.el	Thu Mar 18 20:26:01 2004 +0000
@@ -1,6 +1,6 @@
 ;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands -*- coding: utf-8 -*-
 
-;; Copyright (C) 1985,86,89,92,94,95,96,97,98,1999,2002,2003
+;; Copyright (C) 1985,86,89,92,94,95,96,97,98,1999,2002,03,2004
 ;;       Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
@@ -1446,6 +1446,8 @@
 ;; The utility functions:
 
 (define-derived-mode tex-shell shell-mode "TeX-Shell"
+  (set (make-local-variable 'compilation-parse-errors-function)
+       'tex-compilation-parse-errors)
   (compilation-shell-minor-mode t))
 
 ;;;###autoload
@@ -1879,8 +1881,6 @@
     (let (shell-dirtrack-verbose)
       (tex-send-command tex-shell-cd-command dir)))
   (with-current-buffer (process-buffer (tex-send-command cmd))
-    (make-local-variable 'compilation-parse-errors-function)
-    (setq compilation-parse-errors-function 'tex-compilation-parse-errors)
     (setq compilation-last-buffer (current-buffer))
     (compilation-forget-errors)
     ;; Don't parse previous compilations.
@@ -1927,7 +1927,7 @@
 			end-of-error (match-end 0)))
 		(re-search-forward
 		 "^l\\.\\([0-9]+\\) \\(\\.\\.\\.\\)?\\(.*\\)$" nil 'move))
-      (let* ((this-error (set-marker (make-marker) begin-of-error))
+      (let* ((this-error (copy-marker begin-of-error))
 	     (linenum (string-to-int (match-string 1)))
 	     (error-text (regexp-quote (match-string 3)))
 	     (filename