aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2008-01-27 13:59:47 +0000
committerAlan Mackenzie2008-01-27 13:59:47 +0000
commit4fae8922bea01886f04e534c26b12f2876fefb80 (patch)
tree385463cf69533f0aaccf73959e2bd260eab24a96
parent3e5558010a804bfda1b176b93b81af4eceeb2cb7 (diff)
downloademacs-4fae8922bea01886f04e534c26b12f2876fefb80.tar.gz
emacs-4fae8922bea01886f04e534c26b12f2876fefb80.zip
Introduce elements for the syntactic symbol arglist-cont-nonempty into
c-hanging-braces-alist. Amend pertinent functions and 5 styles.
-rw-r--r--lisp/progmodes/cc-cmds.el6
-rw-r--r--lisp/progmodes/cc-styles.el15
-rw-r--r--lisp/progmodes/cc-vars.el6
3 files changed, 19 insertions, 8 deletions
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 8d3facb08b6..1a2ee3f0ce5 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -524,7 +524,11 @@ inside a literal or a macro, nothing special happens."
524 ;; This is the list of brace syntactic symbols that can hang. 524 ;; This is the list of brace syntactic symbols that can hang.
525 ;; If any new ones are added to c-offsets-alist, they should be 525 ;; If any new ones are added to c-offsets-alist, they should be
526 ;; added here as well. 526 ;; added here as well.
527 '(class-open class-close defun-open defun-close 527 ;;
528 ;; The order of this list is important; if SYNTAX has several
529 ;; elements, the element that "wins" is the earliest in SYMS.
530 '(arglist-cont-nonempty ; e.g. an array literal.
531 class-open class-close defun-open defun-close
528 inline-open inline-close 532 inline-open inline-close
529 brace-list-open brace-list-close 533 brace-list-open brace-list-close
530 brace-list-intro brace-entry-open 534 brace-list-intro brace-entry-open
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el
index 41f1836c0a4..26596e42ae8 100644
--- a/lisp/progmodes/cc-styles.el
+++ b/lisp/progmodes/cc-styles.el
@@ -58,7 +58,8 @@
58 '(("gnu" 58 '(("gnu"
59 (c-basic-offset . 2) 59 (c-basic-offset . 2)
60 (c-comment-only-line-offset . (0 . 0)) 60 (c-comment-only-line-offset . (0 . 0))
61 (c-hanging-braces-alist . ((substatement-open before after))) 61 (c-hanging-braces-alist . ((substatement-open before after)
62 (arglist-cont-nonempty)))
62 (c-offsets-alist . ((statement-block-intro . +) 63 (c-offsets-alist . ((statement-block-intro . +)
63 (knr-argdecl-intro . 5) 64 (knr-argdecl-intro . 5)
64 (substatement-open . +) 65 (substatement-open . +)
@@ -170,7 +171,8 @@
170 (case-label . +) 171 (case-label . +)
171 (access-label . -) 172 (access-label . -)
172 (inclass . ++) 173 (inclass . ++)
173 (inline-open . 0)))) 174 (inline-open . 0)
175 (arglist-cont-nonempty))))
174 176
175 ("linux" 177 ("linux"
176 (c-basic-offset . 8) 178 (c-basic-offset . 8)
@@ -178,7 +180,8 @@
178 (c-hanging-braces-alist . ((brace-list-open) 180 (c-hanging-braces-alist . ((brace-list-open)
179 (brace-entry-open) 181 (brace-entry-open)
180 (substatement-open after) 182 (substatement-open after)
181 (block-close . c-snug-do-while))) 183 (block-close . c-snug-do-while)
184 (arglist-cont-nonempty)))
182 (c-cleanup-list . (brace-else-brace)) 185 (c-cleanup-list . (brace-else-brace))
183 (c-offsets-alist . ((statement-block-intro . +) 186 (c-offsets-alist . ((statement-block-intro . +)
184 (knr-argdecl-intro . 0) 187 (knr-argdecl-intro . 0)
@@ -200,7 +203,8 @@
200 (brace-list-close) 203 (brace-list-close)
201 (brace-entry-open) 204 (brace-entry-open)
202 (substatement-open after) 205 (substatement-open after)
203 (block-close . c-snug-do-while))) 206 (block-close . c-snug-do-while)
207 (arglist-cont-nonempty)))
204 (c-block-comment-prefix . "")) 208 (c-block-comment-prefix . ""))
205 209
206 ("java" 210 ("java"
@@ -230,7 +234,8 @@
230 (c-hanging-braces-alist . ((defun-open after) 234 (c-hanging-braces-alist . ((defun-open after)
231 (defun-close . c-snug-1line-defun-close) 235 (defun-close . c-snug-1line-defun-close)
232 (substatement-open after) 236 (substatement-open after)
233 (block-close . c-snug-do-while))) 237 (block-close . c-snug-do-while)
238 (arglist-cont-nonempty)))
234 (c-hanging-semi&comma-criteria . nil) 239 (c-hanging-semi&comma-criteria . nil)
235 (c-cleanup-list . nil) ; You might want one-liner-defun here. 240 (c-cleanup-list . nil) ; You might want one-liner-defun here.
236 (c-offsets-alist . ((statement-block-intro . +) 241 (c-offsets-alist . ((statement-block-intro . +)
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index c217e6e6871..8b7b9cd24ee 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -729,7 +729,8 @@ involve auto-newline inserted newlines:
729 (module-open after) 729 (module-open after)
730 (composition-open after) 730 (composition-open after)
731 (inexpr-class-open after) 731 (inexpr-class-open after)
732 (inexpr-class-close before)) 732 (inexpr-class-close before)
733 (arglist-cont-nonempty))
733 "*Controls the insertion of newlines before and after braces 734 "*Controls the insertion of newlines before and after braces
734when the auto-newline feature is active. This variable contains an 735when the auto-newline feature is active. This variable contains an
735association list with elements of the following form: 736association list with elements of the following form:
@@ -783,7 +784,8 @@ syntactic context for the brace line."
783 namespace-open namespace-close 784 namespace-open namespace-close
784 module-open module-close 785 module-open module-close
785 composition-open composition-close 786 composition-open composition-close
786 inexpr-class-open inexpr-class-close))) 787 inexpr-class-open inexpr-class-close
788 arglist-cont-nonempty)))
787 :group 'c) 789 :group 'c)
788 790
789(defcustom c-max-one-liner-length 80 791(defcustom c-max-one-liner-length 80