summaryrefslogtreecommitdiffstats
path: root/botan/doc/indent.el
diff options
context:
space:
mode:
authorKeith Isdale <keith.isdale@nokia.com>2010-07-26 14:56:53 +1000
committerKeith Isdale <keith.isdale@nokia.com>2010-07-26 14:56:53 +1000
commit9f034793bcfc51c2b7c1dd14db806f7258f9a9eb (patch)
tree63bd0f50ce5b77828ad8205eafd7b9412810499e /botan/doc/indent.el
parent619d92cfef29e653bfdf852e83888e50cfc4348f (diff)
parent65271649dbc90f3af1184ad1b23bdb64c0c07d07 (diff)
Merge branch 'master' of git://git-nokia.trolltech.com.au/qtsoftware/research/qtuitest
Diffstat (limited to 'botan/doc/indent.el')
-rw-r--r--botan/doc/indent.el57
1 files changed, 57 insertions, 0 deletions
diff --git a/botan/doc/indent.el b/botan/doc/indent.el
new file mode 100644
index 0000000..9811bf8
--- /dev/null
+++ b/botan/doc/indent.el
@@ -0,0 +1,57 @@
+; This Emacs Lips code defines the indentation style used in Botan. If doesn't
+; get everything perfectly correct, but it's pretty close. Copy this code into
+; your .emacs file, or use M-x eval-buffer. Make sure to also set
+; indent-tabs-mode to nil so spaces are inserted instead.
+
+; This style is basically Whitesmiths style with 3 space indents (the Emacs
+; "whitesmith" style seems more like a weird Whitesmiths/Allman mutant style).
+
+; To activate using this style, open the file you want to edit and run this:
+; M-x c-set-style <RET> and then enter "botan". Alternately, put something
+; like this in your .emacs file to make it the default style:
+
+; (add-hook 'c++-mode-common-hook
+; (function (lambda()
+; (c-add-style "botan" botan t))))
+
+(setq botan '(
+ (c-basic-offset . 3)
+ (c-comment-only-line-offset . 0)
+ (c-offsets-alist
+ (c . 0)
+ (comment-intro . 0)
+
+ (statement-block-intro . 0)
+ (statement-cont . +)
+
+ (substatement . +)
+ (substatement-open . +)
+
+ (block-open . +)
+ (block-close . 0)
+
+ (defun-open . +)
+ (defun-close . 0)
+ (defun-block-intro . 0)
+ (func-decl-cont . +)
+
+ (class-open . +)
+ (class-close . +)
+ (inclass . +)
+ (access-label . -)
+ (inline-open . +)
+ (inline-close . 0)
+
+ (extern-lang-open . 0)
+ (extern-lang-close . 0)
+ (inextern-lang . 0)
+
+ (statement-case-open +)
+
+ (namespace-open . 0)
+ (namespace-close . 0)
+ (innamespace . 0)
+
+ (label . 0)
+ )
+))