summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/prototype/getopt.c2
-rw-r--r--src/prototype/prototype.c2
-rw-r--r--src/prototype/prototype.h2
-rw-r--r--src/util/krb5-c-style.el30
4 files changed, 33 insertions, 3 deletions
diff --git a/src/prototype/getopt.c b/src/prototype/getopt.c
index f039c95be0..7f3882c96f 100644
--- a/src/prototype/getopt.c
+++ b/src/prototype/getopt.c
@@ -1,4 +1,4 @@
-/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil */
+/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
extern int optind;
extern char *optarg;
diff --git a/src/prototype/prototype.c b/src/prototype/prototype.c
index 9565d72ca0..085c9b007b 100644
--- a/src/prototype/prototype.c
+++ b/src/prototype/prototype.c
@@ -1,4 +1,4 @@
-/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil */
+/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* prototype/prototype.c
*
diff --git a/src/prototype/prototype.h b/src/prototype/prototype.h
index 5f9590e5e6..1d3b424716 100644
--- a/src/prototype/prototype.h
+++ b/src/prototype/prototype.h
@@ -1,4 +1,4 @@
-/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil */
+/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* prototype/prototype.h
*
diff --git a/src/util/krb5-c-style.el b/src/util/krb5-c-style.el
new file mode 100644
index 0000000000..e366b84104
--- /dev/null
+++ b/src/util/krb5-c-style.el
@@ -0,0 +1,30 @@
+;;; -*- mode: emacs-lisp; indent-tabs-mode: nil -*-
+(defconst krb5-c-style
+ '("bsd"
+ (c-basic-offset . 4)
+ (c-cleanup-list . (brace-elseif-brace
+ brace-else-brace
+ defun-close-semi))
+ (c-comment-continuation-stars . "* ")
+ (c-comment-only-line-offset . 0)
+ (c-electric-pound-behavior . (alignleft))
+ (c-hanging-braces-alist . ((block-close . c-snug-do-while)
+ (brace-list-open)
+ (class-open after)
+ (extern-lang-open after)
+ (substatement-open after)))
+ (c-hanging-colons-alist . ((case-label after)
+ (label after)))
+ (c-hanging-comment-starter-p . nil)
+ (c-hanging-comment-ender-p . nil)
+ (c-indent-comments-syntactically-p . t)
+ (c-label-minimum-indentation . 0)
+ (c-offsets-alist . ((inextern-lang . 0)
+ (arglist-close . 0)))
+ (c-special-indent-hook . nil)
+ (fill-column . 79)))
+
+(defun krb5-c-hook ()
+ (c-add-style "krb5" krb5-c-style))
+
+(add-hook 'c-initialization-hook 'krb5-c-hook)