[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] Changes to auctex/tex.el,v
From: |
Ralf Angeli |
Subject: |
[AUCTeX-diffs] Changes to auctex/tex.el,v |
Date: |
Sun, 30 Nov 2008 20:27:34 +0000 |
CVSROOT: /cvsroot/auctex
Module name: auctex
Changes by: Ralf Angeli <angeli> 08/11/30 20:27:34
Index: tex.el
===================================================================
RCS file: /cvsroot/auctex/auctex/tex.el,v
retrieving revision 5.637
retrieving revision 5.638
diff -u -b -r5.637 -r5.638
--- tex.el 23 Nov 2008 20:41:14 -0000 5.637
+++ tex.el 30 Nov 2008 20:27:33 -0000 5.638
@@ -2573,11 +2573,13 @@
;; hook has to be made here because its local value will be deleted
;; by `kill-all-local-variables' if it is added e.g. in `tex-mode'.)
;;
- ;; `TeX-update-style' has to be called before
+ ;; We now call `TeX-update-style' directly, not in `find-file-hooks'
+ ;; anymore. When this was the case it had to be called before
;; `global-font-lock-mode', which may also be specified in
;; `find-file-hooks', gets called. Otherwise style-based
- ;; fontification will break (in XEmacs). That means, `add-hook'
- ;; cannot be called with a non-nil value of the APPEND argument.
+ ;; fontification would have been broken (in XEmacs). That means,
+ ;; `add-hook' could be called with a non-nil value of the APPEND
+ ;; argument.
;;
;; `(TeX-master-file nil nil t)' has to be called *before*
;; `TeX-update-style' as the latter will call `TeX-master-file'
@@ -2589,8 +2591,13 @@
;; 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))
+ (TeX-master-file nil nil t)))
+ nil t)
+
+ ;; Call `TeX-update-style' directly so that style information is
+ ;; available when the mode hooks are run.
+ (when (file-exists-p (buffer-file-name))
+ (TeX-update-style t)))
;;; Plain TeX mode