Mercurial > emacs
comparison lisp/progmodes/cc-vars.el @ 103117:49b361ba00e8
Enhancements for Objective-C:
cc-vars.el
(c-objc-method-arg-min-delta-to-bracket,
c-objc-method-arg-unfinished-offset, c-objc-method-parameter-offset): New
variables.
(c-offsets-alist): Use c-lineup-ObjC-method-call-colons in entry for
objc-method-call-cont.
cc-langs.el (c-constant-kwds): New ObjC keywords "YES", "NO",
"NS_DURING", "NS_HANDLER", "NS_ENDHANDLER".
cc-align.el (c-lineup-ObjC-method-call-colons): New function.
author | Alan Mackenzie <acm@muc.de> |
---|---|
date | Thu, 30 Apr 2009 10:36:24 +0000 |
parents | 527143cc2cfe |
children | eee42a220506 |
comparison
equal
deleted
inserted
replaced
103116:f08ab194413f | 103117:49b361ba00e8 |
---|---|
931 (defcustom c-progress-interval 5 | 931 (defcustom c-progress-interval 5 |
932 "*Interval used to update progress status during long re-indentation. | 932 "*Interval used to update progress status during long re-indentation. |
933 If a number, percentage complete gets updated after each interval of | 933 If a number, percentage complete gets updated after each interval of |
934 that many seconds. To inhibit all messages during indentation, set | 934 that many seconds. To inhibit all messages during indentation, set |
935 this variable to nil." | 935 this variable to nil." |
936 :type 'integer | |
937 :group 'c) | |
938 | |
939 (defcustom c-objc-method-arg-min-delta-to-bracket 2 | |
940 "*Minimum number of chars to the opening bracket. | |
941 | |
942 Consider this ObjC snippet: | |
943 | |
944 [foo blahBlah: fred | |
945 |<-x->|barBaz: barney | |
946 | |
947 If `x' is less than this number then `c-lineup-ObjC-method-call-colons' | |
948 will defer the indentation decision to the next function. By default | |
949 this is `c-lineup-ObjC-method-call', which would align it like: | |
950 | |
951 [foo blahBlahBlah: fred | |
952 thisIsTooDamnLong: barney | |
953 | |
954 This behaviour can be overridden by customizing the indentation of | |
955 `objc-method-call-cont' in the \"objc\" style." | |
956 :type 'integer | |
957 :group 'c) | |
958 | |
959 (defcustom c-objc-method-arg-unfinished-offset 4 | |
960 "*Offset relative to bracket if first selector is on a new line. | |
961 | |
962 [aaaaaaaaa | |
963 |<-x->|bbbbbbb: cccccc | |
964 ddddd: eeee];" | |
965 :type 'integer | |
966 :group 'c) | |
967 | |
968 (defcustom c-objc-method-parameter-offset 4 | |
969 "*Offset for selector parameter on a new line (relative to first selector. | |
970 | |
971 [aaaaaaa bbbbbbbbbb: | |
972 |<-x->|cccccccc | |
973 ddd: eeee | |
974 ffff: ggg];" | |
936 :type 'integer | 975 :type 'integer |
937 :group 'c) | 976 :group 'c) |
938 | 977 |
939 (defcustom c-default-style '((java-mode . "java") (awk-mode . "awk") | 978 (defcustom c-default-style '((java-mode . "java") (awk-mode . "awk") |
940 (other . "gnu")) | 979 (other . "gnu")) |
1119 ;; Anchor pos: None. | 1158 ;; Anchor pos: None. |
1120 (objc-method-intro . [0]) | 1159 (objc-method-intro . [0]) |
1121 ;; Anchor pos: Boi. | 1160 ;; Anchor pos: Boi. |
1122 (objc-method-args-cont . c-lineup-ObjC-method-args) | 1161 (objc-method-args-cont . c-lineup-ObjC-method-args) |
1123 ;; Anchor pos: At the method start (always at boi). | 1162 ;; Anchor pos: At the method start (always at boi). |
1124 (objc-method-call-cont . c-lineup-ObjC-method-call) | 1163 (objc-method-call-cont . (c-lineup-ObjC-method-call-colons |
1164 c-lineup-ObjC-method-call +)) | |
1125 ;; Anchor pos: At the open bracket. | 1165 ;; Anchor pos: At the open bracket. |
1126 (extern-lang-open . 0) | 1166 (extern-lang-open . 0) |
1127 (namespace-open . 0) | 1167 (namespace-open . 0) |
1128 (module-open . 0) | 1168 (module-open . 0) |
1129 (composition-open . 0) | 1169 (composition-open . 0) |