[PATCH 1/2] uncrustify.cfg: initial support for notmuch coding style

Tomi Ollila tomi.ollila at iki.fi
Sat Jan 21 13:35:27 PST 2012


On Sat, 21 Jan 2012 17:15:08 -0400, David Bremner <david at tethera.net> wrote:
> On Tue, 10 Jan 2012 08:07:07 -0400, David Bremner <david at tethera.net> wrote:
> > From: David Bremner <bremner at debian.org>
> > 
> > Uncrustify is a free (as in GPL2+) tool that indents and beautifies
> > C/C++ code.
> 
> I pushed a revised version of this, with some input from Tomi.  I guess
> this should be documented somewhere either the wiki, under devel, or
> both. Perhaps we should work on a "coding style" page on the wiki, and
> then copy snapshots of that into ./devel? Or just edit a text file in 
> ./devel?

It would be best to have the documents in ./devel and just references to
those on the wiki. To avoid duplication and content drifting.

That particular case:

      enum format_enum {  NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }
-          format_sel = NOTMUCH_FORMAT_TEXT;
+     format_sel = NOTMUCH_FORMAT_TEXT;

Is interesting, running emacs -q notmuch-search.c and tab-indenting that
same line yieds the same results. However, on top-level, i.e.:

enum format_enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }
    format_sel = NOTMUCH_FORMAT_TEXT;

emacs indents just like above.

I like this suggestion:

>*>     enum format_enum {
>*>	    NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT
>*>     } format_sel = NOTMUCH_FORMAT_TEXT;

> 
> d
> 

Tomi


More information about the notmuch mailing list