2243 |
;; `(TeX-master-file nil nil t)' has to be called *before* |
;; `(TeX-master-file nil nil t)' has to be called *before* |
2244 |
;; `TeX-update-style' as the latter will call `TeX-master-file' |
;; `TeX-update-style' as the latter will call `TeX-master-file' |
2245 |
;; without the `ask' bit set. |
;; without the `ask' bit set. |
2246 |
(if (= emacs-major-version 20) |
(add-hook 'find-file-hooks |
2247 |
(make-local-hook 'find-file-hooks)) |
(lambda () |
2248 |
(add-hook 'find-file-hooks (lambda () |
;; Check if we are looking at a new or shared file. |
2249 |
;; Test if we are looking at a new file. |
(when (or (not (file-exists-p (buffer-file-name))) |
2250 |
(unless (file-exists-p (buffer-file-name)) |
(eq TeX-master 'shared)) |
2251 |
(TeX-master-file nil nil t)) |
(TeX-master-file nil nil t)) |
2252 |
(TeX-update-style t)) nil t)) |
(TeX-update-style t)) nil t)) |
2253 |
|
|
2254 |
;;; Plain TeX mode |
;;; Plain TeX mode |
2255 |
|
|