[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-AUCTeX] AUC TeX patch (user was sometimes not queried regarding mas
From: |
Michael Ernst |
Subject: |
[Bug-AUCTeX] AUC TeX patch (user was sometimes not queried regarding master file) |
Date: |
Fri, 8 Feb 2008 10:48:03 +0100 |
Suppose TeX-master-file is nil when visiting a file that contains no local
variables section that overrides TeX-master-file. The user should be
queried for the name of the master file, and a local variables block should
be added to the end of the current buffer. However,
VirTeX-common-initialization includes:
(add-hook 'find-file-hooks
(lambda ()
;; Check if we are looking at a new or shared file.
(when (or (not (file-exists-p (buffer-file-name)))
(eq TeX-master 'shared))
(TeX-master-file nil nil t))
(TeX-update-style t)) nil t))
If TeX-master-file is nil, the hook calls TeX-update-style.
TeX-update-style itself calls TeX-master-file with the ask argument set
to nil. That call to TeX-master-file sets TeX-master to the current file
name, and the user is never queried.
Here is a solution that seems to work for me:
--- /usr/share/emacs/site-lisp/auctex/tex.el 2007-10-05 19:08:09.000000000
+0200
+++ - 2008-02-08 02:47:48.697672357 +0100
@@ -2402,7 +2402,8 @@
(lambda ()
;; Check if we are looking at a new or shared file.
(when (or (not (file-exists-p (buffer-file-name)))
- (eq TeX-master 'shared))
+ (eq TeX-master 'shared)
+ (eq TeX-master nil))
(TeX-master-file nil nil t))
(TeX-update-style t)) nil t))
- [Bug-AUCTeX] AUC TeX patch (user was sometimes not queried regarding master file),
Michael Ernst <=