Please keep the mailing list in Cc, thanks.

Alexander Prähauser <ahp...@protonmail.com> writes:

> "Arash Esbati" <ar...@gnu.org> writes:
>
>> We decided long time ago to put things like this in AUCTeX style files
>> which add entries to the parser:
>>
>>   (add-hook 'TeX-auto-prepare-hook #'LaTeX-floatrow-auto-prepare t)
>>   (add-hook 'TeX-auto-cleanup-hook #'LaTeX-floatrow-auto-cleanup t)
>>   (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
>
> Well, but why not put the call to LaTeX-floatrow-env-init at the
> beginning of the TeX-update-style-hook? Because from the descriptions of
> things I'd assume I'd have to put functions that are supposed to
> override style-specific settings into that hook, so I'd not suspect
> style files to override them in later hooks.

I will think about this.

> But it's just a suggestion, if you don't think it's necessary that's
> fine, all I can say is I found it confusing and hard to find the cause
> of. Maybe it's such a niche issue though that it's not worth rewriting
> it.

Yes, maybe.

> But maybe you could put some warning into the description of the
> LaTeX-update-style-hook that some styles might still use later hooks
> to override its settings and mention some later hook that ensures that
> won't happen (I guess TeX-auto-cleanup-hook).

What do others think?

> Thanks, but I've already found a solution, which was to put override
> advice around TeX-floatrow-env-init since I have my own functions for
> those environments anyway. Finding a solution wasn't actually hard, it
> was finding the cause that was the hard part, and I'm just concerned
> other people might encounter the same issue and be as confused as me.

Ok.  But depending on which Emacs version you're using, you could
probably do:

  (add-hook 'TeX-update-style-hook #'YOUR-FUNCTION 95)

in order to make sure that your function is coming later than the ones
added by AUCTeX.

Best, Arash

  • Please reva... Alexander Prähauser via Discussion list for AUCTeX developers
    • Re: Pl... Arash Esbati
      • Re... Arash Esbati
        • ... Ikumi Keita
          • ... Arash Esbati

Reply via email to