auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] how to disable indentation for tabular-like environment


From: Mosè Giordano
Subject: Re: [AUCTeX] how to disable indentation for tabular-like environment
Date: Fri, 16 Dec 2016 15:09:03 +0100

2016-12-16 15:00 GMT+01:00 Denis Bitouzé <address@hidden>:
> Hi Mosè,
>
> Le 16/12/16 à 14h38, Mosè Giordano a écrit :
>
>> 2016-12-16 8:17 GMT+01:00 Denis Bitouzé <address@hidden>:
>>
>>> I'd like to achieve for `myenv' environment the same behavior as the
>>> `document' environment. For instance, with the following content:
>>>
>>>   ┌────
>>>   │ \documentclass{article}
>>>   │ \begin{document}
>>>   │ Foo.
>>>   │ \end{document}
>>>   └────
>>>
>>> and the cursor is on the line:
>>>
>>>   ┌────
>>>   │ Foo.
>>>   └────
>>>
>>> pressing <TAB> doesn't indent the line.
>>
>> The `LaTeX-document-regexp' option should be what you're looking for.
>
> Regexp? Sigh... why life is to complicated?! ;)

I don't know why it was conceived as a regexp rather than as a list of
environment names (a regexp can be then built automatically).

> Anyway, I couldn't find any reference concerning
> `LaTeX-document-regexp'. Any pointer?

There are a number of AUCTeX's features hidden in the source code,
this increases the pleasure of discovering new features every day ;-)
Jokes apart,

    (setq LaTeX-document-regexp "document\\|foo")

and you're done.

Bye,
Mosè



reply via email to

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