Greetings. On Sat, 09 Sep 2017 02:00:44 +0900, Ikumi Keita <[email protected]> wrote: > IMHO, a style file generated by `TeX-auto-generate' should be > considered as just a "start point" to begin your customize with. The > function does nothing more than mere regexp matchings and is not a > real TeX parser after all.
Sure, but commented package options are a common and syntactically
simple enough case that I would have expected TeX-auto-generate to
handle them properly.
> Well, tuning the regular
> expression for "RequirePackage" would do the trick. Find the part
> ---------------------------------------------------------------
> (defvar LaTeX-auto-class-regexp-list
> '(;; \RequirePackage[<options>]{<package>}[<date>]
> ("\\\\Require\\(Package\\)\\(\\[\\([^#\\.%]*?\\)\\]\\)?\
> {\\([^#\\.\n\r]+?\\)}"
> ...
> ---------------------------------------------------------------
> in latex.el of AUCTeX and replace "[^#\\.%]*?" with "[^\]\\]*", the
> same as the corresponding segment of regexp for usepackage.
Yes, that fixes the problem. Thank you!
Is there a reason why \RequirePackage uses a different regular
expression than \usepackage? If not, then perhaps the AUCTeX
maintainers might consider adopting the change you've given here.
Regards,
Tristan
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Tristan Miller
Free Software developer, ferret herder, logologist
https://logological.org/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
pgpFNOa6QHg_i.pgp
Description: OpenPGP digital signature
_______________________________________________ auctex mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex
