diff options
| author | Gerd Moellmann | 2000-07-24 11:09:35 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-07-24 11:09:35 +0000 |
| commit | e96f5cb7478070e9c91b503d6d3e881ec2ce7dd7 (patch) | |
| tree | 08d5b26b6c21d0d28c85cf5f121f8fb3fe45ed3d | |
| parent | afe93d01f211ba3361de1a7caa9f435f7fab722d (diff) | |
| download | emacs-e96f5cb7478070e9c91b503d6d3e881ec2ce7dd7.tar.gz emacs-e96f5cb7478070e9c91b503d6d3e881ec2ce7dd7.zip | |
(c-style-variables-are-local-p): Incompatible
change by defaulting this to t. It's motivated by the
confusing behavior that otherwise arise from the style system
when editing both java and non-java files at the same time
(see the comments about style setting in c-common-init).
(c-offsets-alist): Changed default for
member-init-cont to c-lineup-multi-inher since it now handles
member initializers and indents better for leading commas.
(c-syntactic-indentation): New variable to turn
off all syntactic indentation.
(c-special-indent-hook): Don't use set-from-style
on this.
| -rw-r--r-- | lisp/progmodes/cc-vars.el | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index 25608653c9e..a5cde4e96ba 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | ;;; cc-vars.el --- user customization variables for CC Mode | 1 | ;;; cc-vars.el --- user customization variables for CC Mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985,1987,1992-1999 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985,1987,1992-2000 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: 1998-1999 Barry A. Warsaw and Martin Stjernholm | 5 | ;; Authors: 2000- Martin Stjernholm |
| 6 | ;; 1998-1999 Barry A. Warsaw and Martin Stjernholm | ||
| 6 | ;; 1992-1997 Barry A. Warsaw | 7 | ;; 1992-1997 Barry A. Warsaw |
| 7 | ;; 1987 Dave Detlefs and Stewart Clamen | 8 | ;; 1987 Dave Detlefs and Stewart Clamen |
| 8 | ;; 1985 Richard M. Stallman | 9 | ;; 1985 Richard M. Stallman |
| @@ -156,7 +157,9 @@ syntactic symbols in `c-offsets-alist'. Please keep it set to nil." | |||
| 156 | :group 'c) | 157 | :group 'c) |
| 157 | 158 | ||
| 158 | (defcustom-c-stylevar c-basic-offset 4 | 159 | (defcustom-c-stylevar c-basic-offset 4 |
| 159 | "*Amount of basic offset used by + and - symbols in `c-offsets-alist'." | 160 | "*Amount of basic offset used by + and - symbols in `c-offsets-alist'. |
| 161 | Also used as the indentation step when `c-syntactic-indentation' is | ||
| 162 | nil." | ||
| 160 | :type 'integer | 163 | :type 'integer |
| 161 | :group 'c) | 164 | :group 'c) |
| 162 | 165 | ||
| @@ -185,12 +188,26 @@ by the `c-comment-only-line-offset' variable." | |||
| 185 | :group 'c) | 188 | :group 'c) |
| 186 | 189 | ||
| 187 | (defcustom c-insert-tab-function 'insert-tab | 190 | (defcustom c-insert-tab-function 'insert-tab |
| 188 | "*Function used when inserting a tab for \\[TAB]. | 191 | "*Function used when inserting a tab for \\[c-indent-command]. |
| 189 | Only used when `c-tab-always-indent' indicates a `real' tab character | 192 | Only used when `c-tab-always-indent' indicates a `real' tab character |
| 190 | should be inserted. Value must be a function taking no arguments." | 193 | should be inserted. Value must be a function taking no arguments." |
| 191 | :type 'function | 194 | :type 'function |
| 192 | :group 'c) | 195 | :group 'c) |
| 193 | 196 | ||
| 197 | (defcustom c-syntactic-indentation t | ||
| 198 | "*Whether the identation should be controlled by the syntactic context. | ||
| 199 | |||
| 200 | If t, the indentation functions indents according to the syntactic | ||
| 201 | context, using the style settings specified by `c-offsets-alist'. | ||
| 202 | |||
| 203 | If nil, every line is just indented to the same level as the previous | ||
| 204 | one, and the \\[c-indent-command] command adjusts the indentation in steps | ||
| 205 | specified by `c-basic-offset'. The indentation style have no effect | ||
| 206 | in this mode, nor any of the indentation associated variables, | ||
| 207 | e.g. `c-special-indent-hook'." | ||
| 208 | :type 'boolean | ||
| 209 | :group 'c) | ||
| 210 | |||
| 194 | (defcustom-c-stylevar c-comment-only-line-offset 0 | 211 | (defcustom-c-stylevar c-comment-only-line-offset 0 |
| 195 | "*Extra offset for line which contains only the start of a comment. | 212 | "*Extra offset for line which contains only the start of a comment. |
| 196 | Can contain an integer or a cons cell of the form: | 213 | Can contain an integer or a cons cell of the form: |
| @@ -509,7 +526,7 @@ want to set `c-style-variables-are-local-p'." | |||
| 509 | :type '(radio | 526 | :type '(radio |
| 510 | (string :tag "Style in all modes (except Java)") | 527 | (string :tag "Style in all modes (except Java)") |
| 511 | (repeat :tag "Mode-specific styles" | 528 | (repeat :tag "Mode-specific styles" |
| 512 | :value ((other . "user")) | 529 | :value ((other . "gnu")) |
| 513 | (cons :format "%v" | 530 | (cons :format "%v" |
| 514 | (choice :tag "Mode" | 531 | (choice :tag "Mode" |
| 515 | (const c-mode) (const c++-mode) | 532 | (const c-mode) (const c++-mode) |
| @@ -555,7 +572,7 @@ want to set `c-style-variables-are-local-p'." | |||
| 555 | ;; Relpos: Boi at the topmost intro line. | 572 | ;; Relpos: Boi at the topmost intro line. |
| 556 | (member-init-intro . +) | 573 | (member-init-intro . +) |
| 557 | ;; Relpos: Boi at the func decl arglist open. | 574 | ;; Relpos: Boi at the func decl arglist open. |
| 558 | (member-init-cont . 0) | 575 | (member-init-cont . c-lineup-multi-inher) |
| 559 | ;; Relpos: Beg of the first member init. | 576 | ;; Relpos: Beg of the first member init. |
| 560 | (inher-intro . +) | 577 | (inher-intro . +) |
| 561 | ;; Relpos: Java: Boi at the class decl start. Otherwise: Boi | 578 | ;; Relpos: Java: Boi at the class decl start. Otherwise: Boi |
| @@ -628,20 +645,23 @@ want to set `c-style-variables-are-local-p'." | |||
| 628 | (comment-intro . c-lineup-comment) | 645 | (comment-intro . c-lineup-comment) |
| 629 | ;; Relpos: None. | 646 | ;; Relpos: None. |
| 630 | (arglist-intro . +) | 647 | (arglist-intro . +) |
| 631 | ;; Relpos: Boi at the open paren. | 648 | ;; Relpos: Boi at the open paren, or at the first non-ws after |
| 649 | ;; the open paren of the surrounding sexp, whichever is later. | ||
| 632 | (arglist-cont . 0) | 650 | (arglist-cont . 0) |
| 633 | ;; Relpos: At the first token after the open paren. | 651 | ;; Relpos: At the first token after the open paren. |
| 634 | (arglist-cont-nonempty . c-lineup-arglist) | 652 | (arglist-cont-nonempty . c-lineup-arglist) |
| 635 | ;; Relpos: Boi at the open paren. | 653 | ;; Relpos: Boi at the open paren, or at the first non-ws after |
| 654 | ;; the open paren of the surrounding sexp, whichever is later. | ||
| 636 | (arglist-close . +) | 655 | (arglist-close . +) |
| 637 | ;; Relpos: Boi at the open paren. | 656 | ;; Relpos: Boi at the open paren, or at the first non-ws after |
| 657 | ;; the open paren of the surrounding sexp, whichever is later. | ||
| 638 | (stream-op . c-lineup-streamop) | 658 | (stream-op . c-lineup-streamop) |
| 639 | ;; Relpos: Boi at the first stream op in the statement. | 659 | ;; Relpos: Boi at the first stream op in the statement. |
| 640 | (inclass . +) | 660 | (inclass . +) |
| 641 | ;; Relpos: At the class open brace if it's at boi, otherwise | 661 | ;; Relpos: At the class open brace if it's at boi, otherwise |
| 642 | ;; boi at the class decl start. | 662 | ;; boi at the class decl start. |
| 643 | (cpp-macro . -1000) | 663 | (cpp-macro . -1000) |
| 644 | ;; Relpos: Boi. | 664 | ;; Relpos: None. |
| 645 | (cpp-macro-cont . c-lineup-dont-change) | 665 | (cpp-macro-cont . c-lineup-dont-change) |
| 646 | ;; Relpos: At the macro start (always at boi). | 666 | ;; Relpos: At the macro start (always at boi). |
| 647 | (friend . 0) | 667 | (friend . 0) |
| @@ -826,7 +846,7 @@ Here is the current list of valid syntactic element symbols: | |||
| 826 | (get 'c-offsets-alist 'c-stylevar-fallback))) | 846 | (get 'c-offsets-alist 'c-stylevar-fallback))) |
| 827 | :group 'c) | 847 | :group 'c) |
| 828 | 848 | ||
| 829 | (defcustom c-style-variables-are-local-p nil | 849 | (defcustom c-style-variables-are-local-p t |
| 830 | "*Whether style variables should be buffer local by default. | 850 | "*Whether style variables should be buffer local by default. |
| 831 | If non-nil, then all indentation style related variables will be made | 851 | If non-nil, then all indentation style related variables will be made |
| 832 | buffer local by default. If nil, they will remain global. Variables | 852 | buffer local by default. If nil, they will remain global. Variables |