[Top][All Lists]

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

[elpa] externals/auctex 70c6499 34/36: Fix to TeX-add-local-master

From: Tassilo Horn
Subject: [elpa] externals/auctex 70c6499 34/36: Fix to TeX-add-local-master
Date: Thu, 22 Dec 2016 13:08:13 +0000 (UTC)

branch: externals/auctex
commit 70c649961416be00181844277a5cc34b41946839
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>

    Fix to TeX-add-local-master
    * tex.el (TeX-add-local-master): Parse local variables again after
      calling the mode function, which killed local variables.
 tex.el |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tex.el b/tex.el
index 1b5f2cb..ab301fd 100644
--- a/tex.el
+++ b/tex.el
@@ -2548,7 +2548,11 @@ Get `major-mode' from master file and enable it."
         comment-prefix "mode: " mode-string "\n"
         comment-prefix "TeX-master: " (prin1-to-string TeX-master) "\n"
         comment-prefix "End:\n")
-       (funcall mode)))))
+       (funcall mode)
+       ;; TeX modes run `VirTeX-common-initialization' which kills all local
+       ;; variables, thus `TeX-master' will be forgotten after `(funcall
+       ;; mode)'.  Reparse local variables in order to bring it back.
+       (hack-local-variables)))))
 (defun TeX-local-master-p ()
   "Return non-nil if there is a `TeX-master' entry in local variables spec.

reply via email to

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