Hi Mosè, thanks for valuable indication!

>>>>> Mosè Giordano <[email protected]> writes:
> I'm not sure this is correct.  Inserting a package name as class
> option doesn't actually load the package.  I think I removed that
> feature exactly because it could have wrongly loaded packages that
> weren't meant to be so.

I'm sorry, I was wrong about whether `TeX-run-style-hooks' loads elisp
files on the fly or not.  It does load the files if they are not loaded
already and run the relavant hooks actually.  Hmm...

How about the attached patch?  It introduces a new entry :classopt in
style hook dialect and assigns all hooks associated with class option
into that new dialect.  It let-binds `TeX-style-hook-dialect' to
:classopt when it runs these hooks, so the package style hooks aren't
touched.

Some disadvantages:
- If "foo" is the class option, it doesn't suppress trying to load
  the style file "foo.el(c)", just avoids to run the package style hooks
  defined in that file.
- It is strange to call class options as "dialect".  My intention is to
  regard it as a "pseudo-dialect", but it might not be an acceptable
  idea.

Regards,
Ikumi Keita

Attachment: fix-class-option-hook.gz
Description: tentative proposal

_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to