[Babel-users] emacs and "babeld style"
Antonin Décimo
antonin.decimo at gmail.com
Sun Nov 11 18:39:34 GMT 2018
The code _style_ of babeld is mostly sane. I've never had any problem
with Emacs auto-guessing the code style, and I can't help you on Lisp
incantations. Cpp rules can be ignored.
Here are some ground rules, extrapolated from what I've seen.
function types on their own line.
function braces on their own line.
break arguments at the first column after the opening parenthesis.
opening brace for constructs such as for, while, must follow on the
same line.
closing brace always on its own line.
4 spaces indent.
declare variables at the beginning of a block (function ?)
there are a few util functions in util.h.
store the return code of a syscall into an "int rc" variable, and test
that result.
no trailing spaces.
fully qualified types (no typedef)
no bugs (enforced in the code style).
do loop-free routing.
A commit message begins with an uppercase letter and ends with a dot.
Beware the moment when you stop editing in Emacs, but Emacs starts
editing *you*.
-- Antonin
More information about the Babel-users
mailing list