1 ;; -*- lisp-interaction -*-
6 ;; Rich's personal .emacs file. feel free to copy.
8 ;; Last Mod Wed Feb 5 16:11:47 PST 1992, by rich@cygnus.com
13 ;; This section sets constants used by c-mode for formating
17 ;; If `c-auto-newline' is non-`nil', newlines are inserted both
18 ;;before and after braces that you insert, and after colons and semicolons.
19 ;;Correct C indentation is done on all the lines that are made this way.
21 (setq c-auto-newline nil)
24 ;;*Non-nil means TAB in C mode should always reindent the current line,
25 ;;regardless of where in the line point is when the TAB command is used.
26 ;;It might be desirable to set this to nil for CVS, since unlike GNU
27 ;; CVS often uses comments over to the right separated by TABs.
28 ;; Depends some on whether you're in the habit of using TAB to
30 ;(setq c-tab-always-indent nil)
32 ;;; It seems to me that
33 ;;; `M-x set-c-style BSD RET'
35 ;;; (set-c-style "BSD")
36 ;;; takes care of the indentation parameters correctly.
39 ;; C does not have anything analogous to particular function names for which
40 ;;special forms of indentation are desirable. However, it has a different
41 ;;need for customization facilities: many different styles of C indentation
44 ;; There are six variables you can set to control the style that Emacs C
48 ;; Indentation of C statements within surrounding block. The surrounding
49 ;; block's indentation is the indentation of the line on which the
50 ;; open-brace appears.
52 (setq c-indent-level 4)
54 ;;`c-continued-statement-offset'
55 ;; Extra indentation given to a substatement, such as the then-clause of
56 ;; an if or body of a while.
58 (setq c-continued-statement-offset 4)
61 ;; Extra indentation for line if it starts with an open brace.
63 (setq c-brace-offset -4)
65 ;;`c-brace-imaginary-offset'
66 ;; An open brace following other text is treated as if it were this far
67 ;; to the right of the start of its line.
69 (setq c-brace-imaginary-offset 0)
72 ;; Indentation level of declarations of C function arguments.
74 (setq c-argdecl-indent 4)
77 ;; Extra indentation for line that is a label, or case or default.
79 (setq c-label-offset -4)