auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] Default environment for "LaTeX-environment"


From: Dirk Ullrich
Subject: [AUCTeX-devel] Default environment for "LaTeX-environment"
Date: Fri, 6 Feb 2009 23:02:38 +0100

Hi,

when calling "LaTeX-environment" for a LaTeX buffer that contains only
whitespace between point and the buffer's begin, "document" is
suggested as default environment to be inserted. I would like that
behavior extended to LaTeX buffers with nothing but commented lines
and whitespace between point and the begin of the buffer. (This is
useful, for instance, if you use, like I, a standard comment block at
the begin of every LaTeX file.)

To get this I have enhanced "TeX-near-bobp" with an optional argument.
When non-nil, not only whitespace lines will be skipped but commented
lines too. This allows to get behavior sketched above.

Maybe it's a good idea to preserve the old behavior for docTeX. But
this could easily be acomplished by letting the optional argument of
the enhanced "TeX-near-bobp" depend on the buffer's mode.

Dirk

Attachment: default-env.diff
Description: Text Data


reply via email to

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