Initial import from FreeBSD RELENG_4:
[dragonfly.git] / gnu / usr.bin / as / gas-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 ;; this file sets emacs up for the type of C source code formatting used within
9 ;; gas.  I don't use gnu indent.  If you do, and find a setup that approximates
10 ;; these settings, please send it to me.
11 ;;
12 ;; Last Mod Thu Feb 13 00:59:16 PST 1992, by rich@sendai
13 ;;
14
15 ;;
16 ;;
17 ;;      This section sets constants used by c-mode for formating
18 ;;
19 ;;
20
21
22 ;;  If `c-auto-newline' is non-`nil', newlines are inserted both
23 ;;before and after braces that you insert, and after colons and semicolons.
24 ;;Correct C indentation is done on all the lines that are made this way.
25
26 (setq c-auto-newline nil)
27
28
29 ;;  If `c-tab-always-indent' is non-`nil', the TAB command
30 ;;in C mode does indentation only if point is at the left margin or within
31 ;;the line's indentation.  If there is non-whitespace to the left of point,
32 ;;then TAB just inserts a tab character in the buffer.  Normally,
33 ;;this variable is `nil', and TAB always reindents the current line.
34
35 (setq c-tab-always-indent nil)
36
37 ;;  C does not have anything analogous to particular function names for which
38 ;;special forms of indentation are desirable.  However, it has a different
39 ;;need for customization facilities: many different styles of C indentation
40 ;;are in common use.
41 ;;
42 ;;  There are six variables you can set to control the style that Emacs C
43 ;;mode will use.
44 ;;
45 ;;`c-indent-level'     
46 ;;     Indentation of C statements within surrounding block.  The surrounding
47 ;;     block's indentation is the indentation of the line on which the
48 ;;     open-brace appears.
49
50 (setq c-indent-level 8)
51
52 ;;`c-continued-statement-offset'     
53 ;;     Extra indentation given to a substatement, such as the then-clause of
54 ;;     an if or body of a while.
55
56 (setq c-continued-statement-offset 4)
57
58 ;;`c-brace-offset'     
59 ;;     Extra indentation for line if it starts with an open brace.
60
61 (setq c-brace-offset 0)
62
63 ;;`c-brace-imaginary-offset'     
64 ;;     An open brace following other text is treated as if it were this far
65 ;;     to the right of the start of its line.
66
67 (setq c-brace-imaginary-offset 0)
68
69 ;;`c-argdecl-indent'     
70 ;;     Indentation level of declarations of C function arguments.
71
72 (setq c-argdecl-indent 0)
73
74 ;;`c-label-offset'     
75 ;;     Extra indentation for line that is a label, or case or default.
76
77 (setq c-label-offset -8)
78
79 ;; end of gas-format.el