emacs-devel
[Top][All Lists]
Advanced

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

RE: adding to emacs coding standard / formatting


From: Drew Adams
Subject: RE: adding to emacs coding standard / formatting
Date: Mon, 19 Oct 2020 08:37:50 -0700 (PDT)

> FWIW, I wouldn't like to see this added to our coding standards at a
> language level.  I find it overly bureaucratic.  Files should follow a
> standard that makes sense to what its trying to present.
> 
> Also, third-party package developers should have some room to maintain
> their own standards.

FWIW, I agree.

I personally do group things, and label the groupings,
when it makes sense.

But there are different ways to group/organize things,
and, as always, local consistency is more important
than global consistency.  (Who knows best which
organization makes most sense locally?  The author.)

For example, it may typically make sense to put
defcustoms together - I generally do that, in a
section labeled to that effect.

But sometimes it makes sense to put a particular
defcustom together with some other bits of code
directly related to it, where that group of stuff is
not so tightly related to the other parts of the file.
For example, when some subfeature is involved, guarded
by some condition, e.g., (when (featurep 'foo) ...).

Our coding conventions are just guidelines (except
for inclusion in Emacs, where they're considered more
strictly).  But they should be important, not
gratuitous.  In general, users should be the judges of
how to organize and present their work.  Guidelines
should be a help, not a hindrance.

[BTW, there is plenty of code that's part of Emacs
that doesn't strictly follow our guidelines - max
line length, for instance.]



reply via email to

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