Re: [PATCH] STYLE: Initial draft of coding style document

Subject: Re: [PATCH] STYLE: Initial draft of coding style document

Date: Mon, 30 Jan 2012 16:38:55 +0200

To: David Bremner, notmuch@notmuchmail.org

Cc: David Bremner

From: Tomi Ollila


On Fri, 27 Jan 2012 19:46:58 -0400, David Bremner <david@tethera.net> wrote:
> From: David Bremner <bremner@debian.org>

[ ... ]

> +
> +* Indent is 4 spaces with mixed tabs/spaces and a tab width of 8.
> +  Tabs should be only at the beginning of the line.

So, after initial indentation (with tabs) there should not be further
tabs? We'll be using the former instead of the latter in these 2 below?

/* excerpt from command-line-arguments.h -- indentation without tabs */

enum notmuch_opt_type {
    NOTMUCH_OPT_END = 0,
    NOTMUCH_OPT_BOOLEAN,        /* --verbose              */
    NOTMUCH_OPT_INT,            /* --frob=8               */
    NOTMUCH_OPT_KEYWORD,        /* --format=raw|json|text */
    NOTMUCH_OPT_STRING,         /* --file=/tmp/gnarf.txt  */
    NOTMUCH_OPT_POSITION        /* notmuch dump pos_arg   */
};

/* excerpt from command-line-arguments.h -- indentation with tabs */

enum notmuch_opt_type {
    NOTMUCH_OPT_END = 0,
    NOTMUCH_OPT_BOOLEAN,	/* --verbose              */
    NOTMUCH_OPT_INT,		/* --frob=8               */
    NOTMUCH_OPT_KEYWORD,	/* --format=raw|json|text */
    NOTMUCH_OPT_STRING,		/* --file=/tmp/gnarf.txt  */
    NOTMUCH_OPT_POSITION	/* notmuch dump pos_arg   */
};


[ ... ]


Tomi

Thread: