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

From: Ikumi Keita <[email-masked]>
Date: Tue, 25 Feb 2025 02:47:23 +0900

Hi Arash,

>>>>> Arash Esbati <[email-masked]> writes:
> 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.

Thanks, now I realize what is difficult. What we are facing is related
to this comment in `TeX-run-style-hooks':
;; This happens in case some style added a new parser, and
;; now the style isn't used anymore (user deleted
;; \usepackage{style}).  Then we're left over with, e.g.,
;; (LaTeX-add-siunitx-units "\\parsec"), but the function is
;; defined in a style siunitx.el that's not loaded anymore.

The problem is hard to solve because it is almost impossible for AUCTeX
to be aware that the user has deleted or commented out \usepackage :-(

...Hmm, I began to be puzzled. I realize that I'm not sure why we need
the entries for `LaTeX-verbatim-macros-with-delims-local' in
parsed-file.el. `TeX-run-style-hooks' in the parsed-file.el runs hooks
associated with "hyperref", one of which adds various items to -local
variables as expected, even for child files which are \include'd or
\input'ted. What am I missing?

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW