all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@online.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Extending Alignment in C/C++ expressions (align.el)
Date: Tue, 11 Sep 2007 18:51:14 +0200	[thread overview]
Message-ID: <200709111851.15332.andreas.roehler@online.de> (raw)
In-Reply-To: <1189509297.802688.33670@r29g2000hsg.googlegroups.com>

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 

  parent reply	other threads:[~2007-09-11 16:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-10 12:37 Extending Alignment in C/C++ expressions (align.el) Nordlöw
2007-09-10 16:30 ` Tom Tromey
2007-09-10 20:10 ` Andreas Röhler
     [not found] ` <mailman.677.1189484458.18990.help-gnu-emacs@gnu.org>
2007-09-11 11:14   ` Nordlöw
2007-09-11 15:07     ` Tom Tromey
2007-09-11 16:51     ` Andreas Röhler [this message]
     [not found]     ` <mailman.713.1189529369.18990.help-gnu-emacs@gnu.org>
2007-09-11 20:23       ` Nordlöw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200709111851.15332.andreas.roehler@online.de \
    --to=andreas.roehler@online.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.