aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2020-05-26 20:08:15 +0000
committerAlan Mackenzie2020-05-26 20:08:15 +0000
commit5467aac131fb49ff2af57ca21d7ec9cba7c19c82 (patch)
treec91ab7c811ed1e2af04226c4b08c40b607f5b22d
parent9f7bfb6cb06f1480a0904184cabf187e03628e55 (diff)
downloademacs-5467aac131fb49ff2af57ca21d7ec9cba7c19c82.tar.gz
emacs-5467aac131fb49ff2af57ca21d7ec9cba7c19c82.zip
Introduce some Objective-C 2.0 keywords. This fixes bug #5953
* lisp/progmodes/cc-langs.el (c-other-decl-kwds): New keywords @property, @dynamic, @synthesize, @compatibility_alias. (c-protection-kwds): New keywords @package, @required, @optional. (c-block-stmt-1-kwds): New keyword @autoreleasepool. (c-constant-kwds): New keywords IBAction, IBOutlet.
-rw-r--r--lisp/progmodes/cc-langs.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 2369cb03428..dcffc0d31b4 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -2416,7 +2416,8 @@ If any of these also are on `c-type-list-kwds', `c-ref-list-kwds',
2416`c-<>-type-kwds', or `c-<>-arglist-kwds' then the associated clauses 2416`c-<>-type-kwds', or `c-<>-arglist-kwds' then the associated clauses
2417will be handled." 2417will be handled."
2418 t nil 2418 t nil
2419 objc '("@class" "@end" "@defs") 2419 objc '("@class" "@defs" "@end" "@property" "@dynamic" "@synthesize"
2420 "@compatibility_alias")
2420 java '("import" "package") 2421 java '("import" "package")
2421 pike '("import" "inherit")) 2422 pike '("import" "inherit"))
2422 2423
@@ -2539,7 +2540,8 @@ one of `c-type-list-kwds', `c-ref-list-kwds',
2539 "Access protection label keywords in classes." 2540 "Access protection label keywords in classes."
2540 t nil 2541 t nil
2541 c++ '("private" "protected" "public") 2542 c++ '("private" "protected" "public")
2542 objc '("@private" "@protected" "@public")) 2543 objc '("@private" "@protected" "@package" "@public"
2544 "@required" "@optional"))
2543 2545
2544(c-lang-defconst c-protection-key 2546(c-lang-defconst c-protection-key
2545 ;; A regexp match an element of `c-protection-kwds' cleanly. 2547 ;; A regexp match an element of `c-protection-kwds' cleanly.
@@ -2754,7 +2756,7 @@ identifiers that follows the type in a normal declaration."
2754 "Statement keywords followed directly by a substatement." 2756 "Statement keywords followed directly by a substatement."
2755 t '("do" "else") 2757 t '("do" "else")
2756 c++ '("do" "else" "try") 2758 c++ '("do" "else" "try")
2757 objc '("do" "else" "@finally" "@try") 2759 objc '("do" "else" "@finally" "@try" "@autoreleasepool")
2758 java '("do" "else" "finally" "try") 2760 java '("do" "else" "finally" "try")
2759 idl nil) 2761 idl nil)
2760 2762
@@ -2897,7 +2899,8 @@ This construct is \"<keyword> <expression> :\"."
2897 c++ (append 2899 c++ (append
2898 '("nullptr") 2900 '("nullptr")
2899 (c-lang-const c-constant-kwds c)) 2901 (c-lang-const c-constant-kwds c))
2900 objc '("nil" "Nil" "YES" "NO" "NS_DURING" "NS_HANDLER" "NS_ENDHANDLER") 2902 objc '("nil" "Nil" "YES" "NO" "IBAction" "IBOutlet"
2903 "NS_DURING" "NS_HANDLER" "NS_ENDHANDLER")
2901 idl '("TRUE" "FALSE") 2904 idl '("TRUE" "FALSE")
2902 java '("true" "false" "null") ; technically "literals", not keywords 2905 java '("true" "false" "null") ; technically "literals", not keywords
2903 pike '("UNDEFINED")) ;; Not a keyword, but practically works as one. 2906 pike '("UNDEFINED")) ;; Not a keyword, but practically works as one.