Hi Keita, Ikumi Keita <ik...@ikumi.que.jp> writes:
> The key clash isn't direct consequence of (require 'latex) in > context.el. Even without (require 'latex), it would occur when LaTeX > document and ConTeXt document are opened in the same emacs session. The > culprit is that > (TeX-auto-add-type "environment" "LaTeX") > in latex.el and > (TeX-auto-add-type "environment" "ConTeXt") > in context.el add entries with the same key "environment" in > `TeX-auto-parser'. Thus we need to fix `TeX-auto-add-type'. Thanks, that was the missing piece. I had in my mind that `TeX-auto-parser' is buffer-local. Would it break something if we do this: --8<---------------cut here---------------start------------->8--- diff --git a/tex.el b/tex.el index 317b8b49..49f95806 100644 --- a/tex.el +++ b/tex.el @@ -3839,7 +3839,7 @@ The algorithm is as follows: "Parsing TeX files from AUCTeX." :group 'AUCTeX) -(defvar TeX-auto-parser '((styles TeX-auto-file TeX-run-style-hooks))) +(defvar-local TeX-auto-parser '((styles TeX-auto-file TeX-run-style-hooks))) ;; Alist of parsed information. ;; Each entry is a list with the following elements: ;; --8<---------------cut here---------------end--------------->8--- Best, Arash