Oleh <[email protected]> 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:
>
>     \if@sometoggle%
>       \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.

(\if@sometoggle might still be a special case, though.)

Bye,
Tassilo


_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to