Hi Mosè,

I found the change I sent last month was incomplete.  Using fake mode
name should only be enabled when `enable-local-variables' is non-nil.
Otherwise, `major-mode' is left unchanged as undesired value.  Now I'm
sending additional patch to resolve this issue.  I would appreciate if
you could apply this change to the repository.

> The git-am manual indicates the option `--patch-format=hg' to force
> recognition of the patch format and this does the trick for me.
> Usually git is able to autodetect the format, but when it fails (as
> occurred to me) I can use this option.  Long story short: you can
> provide patches with `hg export'.

Led by this message, I try to attach the patch created with `hg
export'.  I hope this makes a way.

Regards,
Ikumi Keita

# HG changeset patch
# User Ikumi Keita <[email protected]>
# Date 1463146139 -32400
#      Fri May 13 22:28:59 2016 +0900
# Node ID d2ed32f0705f9dfa23b891a0bc642c0d866fc0dd
# Parent  a1274bd23487d5a74f99715e120927c89338521e
Tweak mode name only when file local variable is enabled.

* tex-jp.el (japanese-plain-tex-mode-initialization)
  (japanese-latex-mode-initialization): Tweak mode name only
  when `enable-local-variables' is non-nil.

diff --git a/tex-jp.el b/tex-jp.el
--- a/tex-jp.el
+++ b/tex-jp.el
@@ -406,9 +406,10 @@
 
     ;; For the intent of the following lines, see the comments below
     ;; in `japanese-latex-mode-initialization'.
-    (setq major-mode 'japanese-plain-tex-mode)
-    (add-hook 'hack-local-variables-hook 'japanese-TeX-reset-mode-name
-	      nil t)))
+    (when enable-local-variables
+      (setq major-mode 'japanese-plain-tex-mode)
+      (add-hook 'hack-local-variables-hook 'japanese-TeX-reset-mode-name
+		nil t))))
 
 (add-hook 'plain-TeX-mode-hook 'japanese-plain-tex-mode-initialization)
 
@@ -456,9 +457,10 @@
     ;; Thus we temporarily set `major-mode' to `japanese-latex-mode'
     ;; here and plan to reset it to `latex-mode' after
     ;; `hack-local-variables' is done.
-    (setq major-mode 'japanese-latex-mode)
-    (add-hook 'hack-local-variables-hook 'japanese-TeX-reset-mode-name
-	      nil t)))
+    (when enable-local-variables
+      (setq major-mode 'japanese-latex-mode)
+      (add-hook 'hack-local-variables-hook 'japanese-TeX-reset-mode-name
+		nil t))))
 
 (add-hook 'LaTeX-mode-hook 'japanese-latex-mode-initialization)
 
_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to