auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] Changes to auctex/tex.el


From: Ralf Angeli
Subject: [AUCTeX-diffs] Changes to auctex/tex.el
Date: Sat, 07 May 2005 10:19:34 -0400

Index: auctex/tex.el
diff -u auctex/tex.el:5.510 auctex/tex.el:5.511
--- auctex/tex.el:5.510 Fri May  6 15:48:42 2005
+++ auctex/tex.el       Sat May  7 14:19:34 2005
@@ -2243,13 +2243,13 @@
   ;; `(TeX-master-file nil nil t)' has to be called *before*
   ;; `TeX-update-style' as the latter will call `TeX-master-file'
   ;; without the `ask' bit set.
-  (if (= emacs-major-version 20)
-      (make-local-hook 'find-file-hooks))
-  (add-hook 'find-file-hooks (lambda ()
-                              ;; Test if we are looking at a new file.
-                              (unless (file-exists-p (buffer-file-name))
-                                (TeX-master-file nil nil t))
-                              (TeX-update-style t)) nil t))
+  (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))
 
 ;;; Plain TeX mode
 




reply via email to

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