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

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

Re: formatting function argument list


From: Benjamin Rutt
Subject: Re: formatting function argument list
Date: Sun, 25 May 2003 17:13:56 -0400
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (usg-unix-v)

Timur Aydin <ta@taydin.org> writes:

> /* All arguments in one line, one space between type and argument */
> int func(int a, char b, size_t c)
> {
>    /* Function body (nicely indented) */
> }

Nice, except it won't scale for many-argument functions.

[...]

> /* One argument per line, arguments aligned. */
> int func(int    a,
>          char   b,
>          size_t c)
> {
>    /* Function body (nicely indented) */
> }

This style can be achieved automagically if you M-x align the region.
Note:  once you start doing this, you will wish to use it everywhere.
Very addictive!
-- 
Benjamin


reply via email to

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