From 670fee9dd7baddb46f78478dfea9f62fecf416cb Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Mon, 26 Oct 2009 19:08:43 +0000 Subject: [PATCH] Fix missing emacs file variable markers. Add krb5-c-style.el: the 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 | 2 +- src/prototype/prototype.c | 2 +- src/prototype/prototype.h | 2 +- src/util/krb5-c-style.el | 30 ++++++++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 src/util/krb5-c-style.el diff --git a/src/prototype/getopt.c b/src/prototype/getopt.c index f039c95be..7f3882c96 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 9565d72ca..085c9b007 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 5f9590e5e..1d3b42471 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 000000000..e366b8410 --- /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) -- 2.26.2