Commit 3f2c97ea authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(tex-shell): Set error parsing function here.

(tex-send-tex-command): Rather than here.
(tex-compilation-parse-errors): Simplify.
parent 63fbe552
;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands -*- coding: utf-8 -*- ;;; 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. ;; Free Software Foundation, Inc.
;; Maintainer: FSF ;; Maintainer: FSF
...@@ -1446,6 +1446,8 @@ Mark is left at original location." ...@@ -1446,6 +1446,8 @@ Mark is left at original location."
;; The utility functions: ;; The utility functions:
(define-derived-mode tex-shell shell-mode "TeX-Shell" (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)) (compilation-shell-minor-mode t))
;;;###autoload ;;;###autoload
...@@ -1879,8 +1881,6 @@ FILE is typically the output DVI or PDF file." ...@@ -1879,8 +1881,6 @@ FILE is typically the output DVI or PDF file."
(let (shell-dirtrack-verbose) (let (shell-dirtrack-verbose)
(tex-send-command tex-shell-cd-command dir))) (tex-send-command tex-shell-cd-command dir)))
(with-current-buffer (process-buffer (tex-send-command cmd)) (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)) (setq compilation-last-buffer (current-buffer))
(compilation-forget-errors) (compilation-forget-errors)
;; Don't parse previous compilations. ;; Don't parse previous compilations.
...@@ -1927,7 +1927,7 @@ for the error messages." ...@@ -1927,7 +1927,7 @@ for the error messages."
end-of-error (match-end 0))) end-of-error (match-end 0)))
(re-search-forward (re-search-forward
"^l\\.\\([0-9]+\\) \\(\\.\\.\\.\\)?\\(.*\\)$" nil 'move)) "^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))) (linenum (string-to-int (match-string 1)))
(error-text (regexp-quote (match-string 3))) (error-text (regexp-quote (match-string 3)))
(filename (filename
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment