[FFmpeg-cvslog] doc: Improve suggested Emacs settings for our coding style.
Diego Biurrun
git at videolan.org
Sun Apr 15 23:36:04 CEST 2012
ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Sat Apr 14 19:24:16 2012 +0200| [3892e784f2225b32c87a5996347994f108fbd369] | committer: 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.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3892e784f2225b32c87a5996347994f108fbd369
---
doc/developer.texi | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/doc/developer.texi b/doc/developer.texi
index 046743f..a4fdf3a 100644
--- a/doc/developer.texi
+++ b/doc/developer.texi
@@ -226,10 +226,16 @@ autocmd InsertEnter * match ForbiddenWhitespace /\t\|\s\+\%#\@@<!$/
For Emacs, add these roughly equivalent lines to your @file{.emacs.d/init.el}:
@example
-(setq c-default-style "k&r")
-(setq-default c-basic-offset 4)
-(setq-default indent-tabs-mode nil)
-(setq-default show-trailing-whitespace t)
+(c-add-style "libav"
+ '("k&r"
+ (c-basic-offset . 4)
+ (indent-tabs-mode nil)
+ (show-trailing-whitespace t)
+ (c-offsets-alist
+ (statement-cont . (c-lineup-assignments +)))
+ )
+ )
+(setq c-default-style "libav")
@end example
@section Development Policy
More information about the ffmpeg-cvslog
mailing list