[neomutt-devel] Naming in NeoMutt

Richard Russon rich at flatcap.org
Mon Jul 17 23:53:44 CEST 2017

I've been busy doing some house-keeping...

# Coding Standards


All struct/enum/unions names are MixedCase
All struct/union members are snake_case
All enums are named
All enum constants are UPPERCASE
All function names are snake_case
All #define'd constants are UPPERCASE

NeoMutt's use of macros is still very dodgy.
Anyone who wants a bit of a challenge could try sorting *them* out.

# Tricky Naming

The final rename I made was to sort out two functions with overlapping names.


I doubt anyone knew which did what.
The first just did basic layout of strings:

    mutt_format_string -> mutt_simple_format

The second also handled expandos (with callbacks):

    mutt_FormatString -> mutt_expando_format

# Comments

A lot of NeoMutt's code is commented, but the comments were inconsistent.

So, I restructured the comments of nearly 600 functions.  That's not a typo.

Then, I formatted the headers of all 224 files giving them a description.
Finally, I added a descriptive comment block to all 182 structs/enum/unions.

# Documentation

The observant among you will have spotted a new dir in the neomutt repo.


To build the doxygen docs, you'll first need to install 'dot' from the
graphviz package.  Then, simply "make html" in the source dir.

I've commited a copy of the docs into the new doxygen repo.  This is
replicated in the website under /code


It's a bit sparse, for now, but all the existing documentation is visible.

# Summary

229 files changed, 5513 insertions(+), 2192 deletions(-)

    Rich / FlatCap
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 854 bytes
Desc: not available
URL: <http://mailman.neomutt.org/pipermail/neomutt-devel-neomutt.org/attachments/20170717/61dc0c79/attachment.sig>

More information about the neomutt-devel mailing list