[Top][All Lists]

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

Re: [AUCTeX] Set automatically TeX-PDF-from-DVI variable if documentclas

From: Ikumi Keita
Subject: Re: [AUCTeX] Set automatically TeX-PDF-from-DVI variable if documentclass receives option dvipdfmx or dvipdfm
Date: Sun, 11 Nov 2018 19:03:30 +0900

Hi Mosè, thanks for valuable indication!

>>>>> Mosè Giordano <address@hidden> 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

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

Ikumi Keita

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

reply via email to

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