Commit 3892e784 authored by Diego Biurrun's avatar Diego Biurrun

doc: Improve suggested Emacs settings for our coding style.

Switch from changing global values to defining a separate C style
and add appropriate settings for indenting assignments that span
more than one line.
parent 5096399d
...@@ -226,10 +226,16 @@ autocmd InsertEnter * match ForbiddenWhitespace /\t\|\s\+\%#\@@<!$/ ...@@ -226,10 +226,16 @@ autocmd InsertEnter * match ForbiddenWhitespace /\t\|\s\+\%#\@@<!$/
For Emacs, add these roughly equivalent lines to your @file{.emacs.d/init.el}: For Emacs, add these roughly equivalent lines to your @file{.emacs.d/init.el}:
@example @example
(setq c-default-style "k&r") (c-add-style "libav"
(setq-default c-basic-offset 4) '("k&r"
(setq-default indent-tabs-mode nil) (c-basic-offset . 4)
(setq-default show-trailing-whitespace t) (indent-tabs-mode nil)
(show-trailing-whitespace t)
(c-offsets-alist
(statement-cont . (c-lineup-assignments +)))
)
)
(setq c-default-style "libav")
@end example @end example
@section Development Policy @section Development Policy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment