[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/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
pgp2sP3QizSM_.pgp
Description: OpenPGP digital signature
- [AUCTeX] TeX-auto-generate confused by comments, Tristan Miller, 2017/09/08
- Re: [AUCTeX] TeX-auto-generate confused by comments, Ikumi Keita, 2017/09/08
- Re: [AUCTeX] TeX-auto-generate confused by comments,
Tristan Miller <=
- Re: [AUCTeX] TeX-auto-generate confused by comments, Ikumi Keita, 2017/09/09
- Re: [AUCTeX] TeX-auto-generate confused by comments, Tassilo Horn, 2017/09/10
- Re: [AUCTeX] TeX-auto-generate confused by comments, Mosè Giordano, 2017/09/10
- Re: [AUCTeX] TeX-auto-generate confused by comments, Ikumi Keita, 2017/09/10
- Re: [AUCTeX] TeX-auto-generate confused by comments, Arash Esbati, 2017/09/10