Fix missing emacs file variable markers. Add krb5-c-style.el: the
authorTom Yu <tlyu@mit.edu>
Mon, 26 Oct 2009 19:08:43 +0000 (19:08 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 26 Oct 2009 19:08:43 +0000 (19:08 +0000)
emacs lisp settings for the standard coding style.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23049 dc483132-0cff-0310-8789-dd5450dbe970

src/prototype/getopt.c
src/prototype/prototype.c
src/prototype/prototype.h
src/util/krb5-c-style.el [new file with mode: 0644]

index f039c95be0c1c22314f3d4fa147b936712a5a27f..7f3882c96f418e89cbe522ade30426ed8e3595e7 100644 (file)
@@ -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;
index 9565d72ca0e78a5a4a0bfc46159b5822ca364ac6..085c9b007bbf8b5650bb0796ab781fc9832ed71f 100644 (file)
@@ -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
  *
index 5f9590e5e6130cb6212a0a537676d508a7cb026f..1d3b42471680f1a24960bce10d02f92c898a805a 100644 (file)
@@ -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 (file)
index 0000000..e366b84
--- /dev/null
@@ -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)