Subject: bug#70807: Resetting *-local variables before parsing

From: Arash Esbati <[email-masked]>
Date: Sun, 23 Feb 2025 16:53:59 +0100

Hi Keiat,

Ikumi Keita <[email-masked]> writes:

> Hi Arash, sorry for late respose.

No problem!

> I agree that -local variables should be cleared at C-c C-n. My
> preliminary idea is to record names of such variables in a new
> internal variable and kill them in `TeX-normal-mode' like
>         (dolist (var TeX-normal-mode-reset-list)
>           (set var nil)))
> . (Maybe that new variable can be used to simplify `TeX-auto-store'.)

I did some test with resetting the *-local variables in different
places, but none of them was really satisfactory.  Doing the reset in
`TeX-normal-mode' top-level means that the values are never written back
into the parsed-file.el since

  (TeX-update-style t)

comes last in that function.  The best thing I can currently come up
with is to add those variables to `TeX-normal-mode-reset-list' as well.

Any other ideas?

Best, Arash