[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] LaTeX-env-document
From: |
Mads Jensen |
Subject: |
Re: [AUCTeX-devel] LaTeX-env-document |
Date: |
Fri, 04 Jan 2013 20:27:46 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 |
On 2013-01-02 13:27, Tassilo Horn wrote:
>> I have one more suggestion for `LaTeX-env-document': prevent
>> documentclass from being inserted, if there's already one present in the
>> file. At least I find it somewhat annoying to be prompted for it.
>
> That's a better idea than omitting the document environment as you've
> suggested in your other mail.
Yes. The other one was a bit redundant, I admit.
> Some comments:
>
> - The \documentclass macro doesn't need to start a line.
I took the regular expression from `LaTeX-env-contents'. This may need
to be tweaked as well?
> - A commented \documentclass shouldn't prevent it being inserted.
>
> - The regex is a bit too lax, e.g., maybe someone has a
> \documentclasssetup, which would also be matched by your regex.
>
> You might want to have a look at `LaTeX-current-environment' wrt. the
> comment stuff.
Thank you for the comments. I've made attempts at getting this to work,
and I have a basic thing working (with a better regular expression, that
was tested on a few random strings), but I'm somewhat in doubt of all
the tests done in LaTeX-current-environment, and whether I can't just
check for `TeX-in-commented-line' (this is what I currently just do, and
it appears to work quite well)? In particular, I'm confused about what
syntactic comments are. A very small example would be highly appreciated.
Tasilo: You missed to add me in the CC to your reply to listings.diff
I'll write back with a ChangeLog entry in the weekend, and will fix the
couple of things that I noticed were wrong in the patch (newlines, and a
"" inside TeX-add-symbols).
--
Med Venlig Hilsen / Kind Regards,
Mads Jensen
Rubinsteinsvej 31,st.th
DK-2450 Kbh. SV
Denmark
+45 6168 8518
My brain is my second favorite organ.
-- Woody Allen
signature.asc
Description: OpenPGP digital signature