[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-AUCTeX] TeX-parse-Tex alters default-major-mode

From: Bernd Rellermeyer
Subject: [Bug-AUCTeX] TeX-parse-Tex alters default-major-mode
Date: Sun, 15 Jul 2012 09:40:49 +0200

The TeX-parse-TeX function alters the default-major-mode. In some cases, e.g. 
when an error occurs in the preamble, this leads to the creation of a new 
buffer with extension ".log.tex". This version works correct for me, but I do 
not know if that causes any other problems:

(defun TeX-parse-TeX (reparse)
  "Find the next error produced by running TeX.
With \\[universal-argument] prefix, start from the beginning of the errors.

If the file occurs in an included file, the file is loaded (if not
already in an Emacs buffer) and the cursor is placed at the error."
  (let ((old-buffer (current-buffer)))
    (with-current-buffer (TeX-active-buffer)
      (if reparse
      (goto-char TeX-error-point)
      (TeX-parse-error old-buffer))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]