help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Extending Alignment in C/C++ expressions (align.el)


From: Nordlöw
Subject: Re: Extending Alignment in C/C++ expressions (align.el)
Date: Tue, 11 Sep 2007 13:23:37 -0700
User-agent: G2/1.0

On 11 Sep, 18:51, Andreas Röhler <andreas.roeh...@online.de> wrote:
> Am Dienstag, 11. September 2007 13:14 schrieb Nordlöw:
>
>
>
> > On 10 Sep, 18:30, Tom Tromey <tro...@redhat.com> wrote:
> > > >>>>> "Nordlöw" == Nordlöw  <per.nord...@gmail.com> writes:
>
> > > Nordlöw> How can I extend the Emacs package align.el to make M-x
> > > align-entire Nordlöw> additionally align the if sub-expressions and
> > > opening curly-braces as Nordlöw> follows?:
>
> > > Perhaps try align-regexp.
>
> > > Tom
>
> > The variable `align-rules-list' is really big. How can I easily change/
> > extend the part concerning c-assignment? Is there perhaps some variant
> > of add-to-list(), say modify-list-item(), that does just that?
>
> > Thanks again,
> > Per Nordlöw
>
> Don't know. Anyway, customization seems easier then
> writing new code:
>
> M-x customize-variable align-rules-list
>
> C-s c-assignment
>
> Then below you see the regexp-string, which matters.
>
> [^-=!^&*+<>/|
> ]\(\s-*[-=!^&*+<>/|]*\)=\(\s-*\)\([^=
> ]\|$\)
>
> In the middle a single, not parentised `=' - the char taken for indentation.
>
> Simply extend expression here, replace `=' by `[{(=]' -
> a group of signes. (Or any others you want indentation
> work on...)
>
> Then still two switches AFAIR.
>
> Just below:
>
> Set first attributes Value Menu to "Repeat:"
>
> And again below `Bolean' to "on".
>
> So it works for me.
>
> Andreas Röhler

Superb! Works for me! I am in now align heaven...

Emacs developers:
However I do think that the variable align-rules-list is too big. I
think it should be divided up into smaller pieces that can be
individually customized. If I save my customization of align-rules-
list I won't be affected by other changes made to it through updates
in the Emacs CVS repository.

Thank you very much,
Nordlöw



reply via email to

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