auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Indentation of \if statements


From: Tassilo Horn
Subject: Re: [AUCTeX] Indentation of \if statements
Date: Thu, 18 Dec 2014 09:02:54 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Oleh <address@hidden> writes:

Hi Oleh,

> I'd like to call your attention to this question:
>
>     
> http://emacs.stackexchange.com/questions/5439/auto-indenting-if-statements-with-auctex
>
> The intention is basically for AUCTeX to auto-indent like this:
>
>     address@hidden
>       \dosomething%
>     \else%
>       \doanotherthing%
>     \fi%
>
> If this isn't a feature yet,

I don't think so.  We have special indentation possibilities for
environments.

> please consider the code that I've provided in the answer.  I'd be
> willing to submit a patch if you like the idea. It's basically just
> one line in `LaTeX-indent-level-count' and some user-level
> customization.

I'd welcome a patch that generalizes the idea a bit.  For example, the
ifplatform package provides macros like

  \ifwindows
    \this
  \else
    \that
  \fi

and there are dozens of other \if-variants out there.  So it would be
good if an AUCTeX style file could specify that it provides a new
if-then-else-fi macro, and then indentation should just work.

(address@hidden might still be a special case, though.)

Bye,
Tassilo




reply via email to

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