Deleted Added
full compact
c-indentation.el (55714) c-indentation.el (59191)
1; This Emacs Lisp file defines a C indentation style that closely
2; follows most aspects of the one that is used throughout SSLeay,
3; and hence in OpenSSL.
4;
5; This definition is for the "CC mode" package, which is the default
6; mode for editing C source files in Emacs 20, not for the older
7; c-mode.el (which was the default in less recent releaes of Emacs 19).
8;
9; Copy the definition in your .emacs file or use M-x eval-buffer.
10; To activate this indentation style, visit a C file, type
11; M-x c-set-style <RET> (or C-c . for short), and enter "eay".
12; To toggle the auto-newline feature of CC mode, type C-c C-a.
13;
14; Apparently statement blocks that are not introduced by a statement
15; such as "if" and that are not the body of a function cannot
16; be handled too well by CC mode with this indentation style.
17; The style defined below does not indent them at all.
18; To insert tabs manually, prefix them with ^Q (the "quoted-insert"
19; command of Emacs). If you know a solution to this problem
20; or find other problems with this indentation style definition,
21; please send e-mail to bodo@openssl.org.
22
23(c-add-style "eay"
24 '((c-basic-offset . 8)
25 (c-comment-only-line-offset . 0)
26 (c-hanging-braces-alist)
27 (c-offsets-alist . ((defun-open . +)
28 (defun-block-intro . 0)
1; This Emacs Lisp file defines a C indentation style that closely
2; follows most aspects of the one that is used throughout SSLeay,
3; and hence in OpenSSL.
4;
5; This definition is for the "CC mode" package, which is the default
6; mode for editing C source files in Emacs 20, not for the older
7; c-mode.el (which was the default in less recent releaes of Emacs 19).
8;
9; Copy the definition in your .emacs file or use M-x eval-buffer.
10; To activate this indentation style, visit a C file, type
11; M-x c-set-style <RET> (or C-c . for short), and enter "eay".
12; To toggle the auto-newline feature of CC mode, type C-c C-a.
13;
14; Apparently statement blocks that are not introduced by a statement
15; such as "if" and that are not the body of a function cannot
16; be handled too well by CC mode with this indentation style.
17; The style defined below does not indent them at all.
18; To insert tabs manually, prefix them with ^Q (the "quoted-insert"
19; command of Emacs). If you know a solution to this problem
20; or find other problems with this indentation style definition,
21; please send e-mail to bodo@openssl.org.
22
23(c-add-style "eay"
24 '((c-basic-offset . 8)
25 (c-comment-only-line-offset . 0)
26 (c-hanging-braces-alist)
27 (c-offsets-alist . ((defun-open . +)
28 (defun-block-intro . 0)
29 (class-open . +)
30 (class-close . +)
29 (block-open . 0)
31 (block-open . 0)
32 (block-close . 0)
30 (substatement-open . +)
33 (substatement-open . +)
34 (statement . 0)
31 (statement-block-intro . 0)
32 (statement-case-open . +)
33 (statement-case-intro . +)
34 (case-label . -)
35 (label . -)
35 (statement-block-intro . 0)
36 (statement-case-open . +)
37 (statement-case-intro . +)
38 (case-label . -)
39 (label . -)
36 (arglist-cont-nonempty . +)))))
40 (arglist-cont-nonempty . +)
41 (topmost-intro . -)
42 (brace-list-close . +)
43 (brace-list-intro . +)
44 ))))
45