2
0

c-indentation.el 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. ; so you have to indent them manually (you can use C-q tab).
  18. ;
  19. ; For suggesting improvements, please send e-mail to bodo@openssl.org.
  20. (c-add-style "eay"
  21. '((c-basic-offset . 8)
  22. (indent-tabs-mode . t)
  23. (c-comment-only-line-offset . 0)
  24. (c-hanging-braces-alist)
  25. (c-offsets-alist . ((defun-open . +)
  26. (defun-block-intro . 0)
  27. (class-open . +)
  28. (class-close . +)
  29. (block-open . 0)
  30. (block-close . 0)
  31. (substatement-open . +)
  32. (statement . 0)
  33. (statement-block-intro . 0)
  34. (statement-case-open . +)
  35. (statement-case-intro . +)
  36. (case-label . -)
  37. (label . -)
  38. (arglist-cont-nonempty . +)
  39. (topmost-intro . -)
  40. (brace-list-close . 0)
  41. (brace-list-intro . 0)
  42. (brace-list-open . +)
  43. ))))