Hi Arash,

>>>>> Arash Esbati <[email protected]> writes:

> One thing occured to me: You use the following code (which was there
> before):

>     (apply #'TeX-run-style-hooks
>            (apply #'append
>                   (mapcar #'cdr LaTeX-provided-class-options)))

> Assuming that `LaTeX-provided-class-options' usually has only one entry
> (unlike `LaTeX-provided-package-options'), wouldn't be sufficient to do:

>     (apply #'TeX-run-style-hooks
>            (cdar LaTeX-provided-class-options))

That's the point I'd like to know.  I think that the code would usually
suffice, too.  I wonder why `LaTeX-provided-class-options' has a
structure which allows more than one class.  Under what situation can it
have more than one entry?

> Maybe you could also mention `:classopt' in AUCTeX manual under
> `TeX-add-style-hook' [1].

Thanks for suggestion, I'll try another day.

> I did't like this implementation as I wrote it.  I took it mainly since
> `mathtools' does the same thing -- and that is the only style doing this
> AFAIR (off the top of my head, though).

It seems that you are right.  Then I'll take the previous method.

> I think it is cleaner to set this variable outside the style hook and
> write something like this:

>     (defvar LaTeX-empheq-package-options
>       (progn
>         (TeX-load-style "mathtools")
>         (append LaTeX-mathtools-package-options
>                 '("overload" "overload2"
>                   "ntheorem" "newmultline"
>                   "oldmultline")))
>       "Package options for the empheq package.")

> WDYT?

With this code, if the user sets the variable in init file, the expected
code isn't evaluated so the addtional entries are not appended.  Thus I
think it's better to put `TeX-load-style' and `append' outside the
`defvar'.

Best,
Ikumi Keita

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

Reply via email to