[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TeX-remove-style-hook is local
From: |
Tassilo Horn |
Subject: |
Re: TeX-remove-style-hook is local |
Date: |
Tue, 16 Jun 2020 20:53:31 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Ikumi Keita <ikumi@ikumi.que.jp> writes:
>> 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.
I just did it for latex.el on the new core-latex-in-style-hooks branch.
However, there's a stupid problem I don't understand. I open my a.tex
file which just contains:
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\begin{document}
\end{document}
--8<---------------cut here---------------end--------------->8---
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?
> 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.
Well, maybe. But I think it wouldn't be bad to have relatively cheap
"forget & re-init" thingy.
> 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?
> 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.
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.
Bye,
Tassilo
- Re: TeX-remove-style-hook is local, Ikumi Keita, 2020/06/15
- Re: TeX-remove-style-hook is local, Tassilo Horn, 2020/06/15
- Re: TeX-remove-style-hook is local, Ikumi Keita, 2020/06/15
- Re: TeX-remove-style-hook is local, Ikumi Keita, 2020/06/15
- Re: TeX-remove-style-hook is local, Tassilo Horn, 2020/06/15
- Re: TeX-remove-style-hook is local, Ikumi Keita, 2020/06/15
- Re: TeX-remove-style-hook is local, Tassilo Horn, 2020/06/15
- Re: TeX-remove-style-hook is local, Ikumi Keita, 2020/06/16
- Re: TeX-remove-style-hook is local, Tassilo Horn, 2020/06/16
- Re: TeX-remove-style-hook is local, Ikumi Keita, 2020/06/16
- Re: TeX-remove-style-hook is local,
Tassilo Horn <=
- Re: TeX-remove-style-hook is local, Tassilo Horn, 2020/06/16
- Fix of TeX-remove-style (Re: TeX-remove-style-hook is local), Ikumi Keita, 2020/06/17
- Re: Fix of TeX-remove-style (Re: TeX-remove-style-hook is local), Tassilo Horn, 2020/06/17
- Re: Fix of TeX-remove-style (Re: TeX-remove-style-hook is local), Tassilo Horn, 2020/06/17
- Re: Fix of TeX-remove-style (Re: TeX-remove-style-hook is local), Ikumi Keita, 2020/06/18