auctex-devel
[Top][All Lists]
Advanced

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

Fix of TeX-remove-style (Re: TeX-remove-style-hook is local)


From: Ikumi Keita
Subject: Fix of TeX-remove-style (Re: TeX-remove-style-hook is local)
Date: Wed, 17 Jun 2020 17:33:48 +0900

>>>>> Tassilo Horn <tsdh@gnu.org> writes:
> I just did it for latex.el on the new core-latex-in-style-hooks branch.

What a speedy work! :-)

> At that point, TeX-active-styles is

>   ("art10" "article" "a" "latex2e" "LATEX" "LaTeX-core")

> which seems right.  "LaTeX-core" is the new style hook I added.

> But when I do

>   M-: (TeX-remove-style) RET
>   M-: (TeX-update-style t) RET

> TeX-active-styles is

>   ("art10" "article" "latex2e" "a" "NoVirtexSymbols")

> Where is LaTeX-core and LATEX?  And how did "NoVirtexSymbols" arrive
> here?

> Nevermind, the latex2 and latex2e style hooks have to run the LaTeX-core
> style hook, of course.

I guess that "LATEX" style, empty in the current AUCTeX source, was
originally intended for such purpose as "LaTeX-core".
1. LaTeX-common-initialization has
  (TeX-run-style-hooks "LATEX")
2. plain-TeX-common-initialization has
  (TeX-run-style-hooks "TEX")
Probably, Per Abrahamsen had a vague plan to use the first element of
each entry of TeX-format-list as such core style, but didn't finish 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.

> Wouldn't (TeX-update-style t) do the same?

Oh, indeed. That's smarter.

> I wonder why TeX-normal-mode binds TeX-auto-save to t.  I guess there's
> a reason for that, otherwise it wouldn't be there.

I wonder, too.

Regards,
Ikumi Keita



reply via email to

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