This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU AUCTeX".
The branch, master has been updated via db3fcb96aaa768a1b851a00d9254d7135c832251 (commit) from 7518a8a3ae1a85bebd5aa7a9f16e9c36317c150e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit db3fcb96aaa768a1b851a00d9254d7135c832251 Author: Mosè Giordano <m...@gnu.org> Date: Tue Dec 20 23:53:48 2016 +0100 * tex.el (TeX-add-local-master): Inherit major mode from master file. diff --git a/tex.el b/tex.el index e192899..1b5f2cb 100644 --- a/tex.el +++ b/tex.el @@ -2513,7 +2513,9 @@ name of master file if it cannot be determined otherwise." (file-name-directory buffer-file-name))))))) (defun TeX-add-local-master () - "Add local variable for `TeX-master'." + "Add local variable for `TeX-master'. + +Get `major-mode' from master file and enable it." (when (and (buffer-file-name) (string-match TeX-one-master (file-name-nondirectory (buffer-file-name))) @@ -2526,20 +2528,27 @@ name of master file if it cannot be determined otherwise." "End:"))) (beginning-of-line 1) (insert prefix "TeX-master: " (prin1-to-string TeX-master) "\n")) - (let ((comment-prefix (cond ((eq major-mode 'texinfo-mode) "@c ") - ((eq major-mode 'doctex-mode) "% ") - (t "%%% "))) - (mode (concat (and (boundp 'japanese-TeX-mode) japanese-TeX-mode - "japanese-") - (substring (symbol-name major-mode) 0 -5)))) + (let* ((mode (if (stringp TeX-master) + (with-current-buffer + (find-file-noselect + (TeX-master-file TeX-default-extension)) + major-mode) + major-mode)) + (comment-prefix (cond ((eq mode 'texinfo-mode) "@c ") + ((eq mode 'doctex-mode) "% ") + (t "%%% "))) + (mode-string (concat (and (boundp 'japanese-TeX-mode) japanese-TeX-mode + "japanese-") + (substring (symbol-name mode) 0 -5)))) (newline) (when (eq major-mode 'doctex-mode) (insert comment-prefix TeX-esc "endinput\n")) (insert comment-prefix "Local Variables:\n" - comment-prefix "mode: " mode "\n" + comment-prefix "mode: " mode-string "\n" comment-prefix "TeX-master: " (prin1-to-string TeX-master) "\n" - comment-prefix "End:\n"))))) + comment-prefix "End:\n") + (funcall mode))))) (defun TeX-local-master-p () "Return non-nil if there is a `TeX-master' entry in local variables spec. ----------------------------------------------------------------------- Summary of changes: tex.el | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) hooks/post-receive -- GNU AUCTeX
_______________________________________________ auctex-diffs mailing list auctex-di...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-diffs