auctex-devel
[Top][All Lists]
Advanced

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

Re: TeX-remove-style-hook is local


From: Ikumi Keita
Subject: Re: TeX-remove-style-hook is local
Date: Wed, 17 Jun 2020 00:54:46 +0900

Hi Tassilo,

>>>>> Tassilo Horn <tsdh@gnu.org> writes:
> I had a quick look again.  The problem is that many environments,
> counters, lenghts etc. are added in LaTeX-common-initialization and
> likewise for some symbols in plain-TeX-common-initialization.  That runs
> only once when the major modes (LaTeX or PlainTeX) are initialized, so
> nothing will be re-added by TeX-update-style after we nuked all
> information through TeX-remove-style.

Agreed.

> I think the right approach would be to put all those (La)TeX-add-* calls
> into some core style hooks, i.e., in LaTeX-common-initialization there
> would be a

That would amount to certain volume of work. How about discarding the
remove-style feature itself, as discussed briefly yesterday? "git grep
TeX-remove-style" reveals that TeX-remove-style is used only in
TeX-arg-document. Until make-variable-buffer-local was removed from
TeX-remove-style-hook, everything went well. That means that
remove-style feature almost didn't work at all until then and no one was
bothered by it.

I think that it's enough to replace
  (TeX-remove-style)
with
  (setq TeX-style-hook-applied-p nil)
in TeX-arg-document. In this way, we can discard all codes related to
"TeX-remove-style*" in AUCTeX altogether.

More conservative approach is to add another optional argument to
TeX-normal-mode to suppress binding TeX-auto-save to t, and replace
call to TeX-remove-style with TeX-normal-mode, with that new argument
being non-nil.

What do you think about these ideas?

Ikumi Keita



reply via email to

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