auctex-devel
[Top][All Lists]
Advanced

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

Re: TikZ support and ConTeXt environments


From: Arash Esbati
Subject: Re: TikZ support and ConTeXt environments
Date: Tue, 08 Nov 2022 17:21:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Hi Keita,

Ikumi Keita <ikumi@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



reply via email to

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