]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/cvs/cvs-format.el
Import of slightly trimmed cvs-1.8 distribution. Generated files
[FreeBSD/FreeBSD.git] / contrib / cvs / cvs-format.el
1 ;; -*- lisp-interaction -*-
2 ;; -*- emacs-lisp -*-
3 ;;
4 ;;
5 ;; originally from...
6 ;;      Rich's personal .emacs file.  feel free to copy.
7 ;;
8 ;; Last Mod Wed Feb 5 16:11:47 PST 1992, by rich@cygnus.com
9 ;;
10
11 ;;
12 ;;
13 ;;      This section sets constants used by c-mode for formating
14 ;;
15 ;;
16
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.
20
21 (setq c-auto-newline nil)
22
23
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
29 ;; reindent.
30 ;(setq c-tab-always-indent nil)
31
32 ;;; It seems to me that 
33 ;;;    `M-x set-c-style BSD RET'
34 ;;; or
35 ;;;    (set-c-style "BSD")
36 ;;; takes care of the indentation parameters correctly.
37
38
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
42 ;;are in common use.
43 ;;
44 ;;  There are six variables you can set to control the style that Emacs C
45 ;;mode will use.
46 ;;
47 ;;`c-indent-level'     
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.
51
52 (setq c-indent-level 4)
53
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.
57
58 (setq c-continued-statement-offset 4)
59
60 ;;`c-brace-offset'     
61 ;;     Extra indentation for line if it starts with an open brace.
62
63 (setq c-brace-offset -4)
64
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.
68
69 (setq c-brace-imaginary-offset 0)
70
71 ;;`c-argdecl-indent'     
72 ;;     Indentation level of declarations of C function arguments.
73
74 (setq c-argdecl-indent 4)
75
76 ;;`c-label-offset'     
77 ;;     Extra indentation for line that is a label, or case or default.
78
79 (setq c-label-offset -4)
80
81 ;;;; eof