* David Kastrup (2006-02-20) writes:

> Using `TeX-command-buffer' would just read-access variables.

Okay this is my last try:

--- tex-buf.el	07 Feb 2006 14:04:19 +0100	1.247
+++ tex-buf.el	21 Feb 2006 09:33:33 +0100	
@@ -237,7 +237,9 @@
   (interactive "P")
   (if (null (TeX-active-buffer))
       (next-error reparse)
-    (funcall (TeX-process-get-variable (TeX-active-master) 'TeX-parse-function)
+    (funcall (TeX-process-get-variable (with-current-buffer TeX-command-buffer
+					 (TeX-active-master))
+				       'TeX-parse-function)
 	     reparse)))
 
 (defun TeX-previous-error (arg)
@@ -1108,7 +1110,8 @@
 
 (defun TeX-active-buffer ()
   "Return the buffer of the active process for this buffer."
-  (TeX-process-buffer (TeX-active-master)))
+  (TeX-process-buffer (with-current-buffer TeX-command-buffer
+			(TeX-active-master))))
 
 (defun TeX-active-master (&optional extension nondirectory)
   "The master file currently being compiled.
@@ -1444,10 +1447,15 @@
     (let ((runbuf (current-buffer))
 	  (master (with-current-buffer
 		      TeX-command-buffer
-		    (expand-file-name (TeX-master-file)))))
+		    (expand-file-name (TeX-master-file))))
+	  error-file-buffer)
       (run-hooks 'TeX-translate-location-hook)
-      (find-file-other-window file)
-      (setq TeX-master master)
+      (setq error-file-buffer (find-file-other-window file))
+      ;; Set the value of `TeX-command-buffer' in the next file with
+      ;; an error to be displayed to the value in the current buffer.
+      (with-current-buffer error-file-buffer
+	(set (make-local-variable 'TeX-command-buffer)
+	     (with-current-buffer runbuf TeX-command-buffer)))
       (goto-line (+ offset line))
       (if (not (string= string " "))
 	  (search-forward string nil t))
This bug is like a slippery fish wiggling out of my hands every time I
try to grab it.

-- 
Ralf
_______________________________________________
bug-auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to