auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] TeX-auto-generate confused by comments


From: Tristan Miller
Subject: Re: [AUCTeX] TeX-auto-generate confused by comments
Date: Fri, 8 Sep 2017 20:38:32 +0200

Greetings.

On Sat, 09 Sep 2017 02:00:44 +0900, Ikumi Keita
<address@hidden> 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/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Attachment: pgp2sP3QizSM_.pgp
Description: OpenPGP digital signature


reply via email to

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