bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5953: 23.1.95; objc-mode doesn't fontify Objective-C 2.0 keywords @s


From: Paul Smith
Subject: bug#5953: 23.1.95; objc-mode doesn't fontify Objective-C 2.0 keywords @syntesize and @property correctly
Date: Mon, 25 May 2020 00:52:29 -0400

On Mon, 2020-05-25 at 00:34 -0400, Richard Stallman wrote:
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> 
>   > Somehow, adding nine keywords together with their semantics seems to go
>   > outside the bounds of "trivial" for copyright purposes, even if they do
>   > fit into the arbitrary maximum number of lines.
> 
> Would you like to show me the patch?  That description suggests that
> maybe it is trivial.

It's unfortunate that the SourceForge mailing list archives are so
gross.  FYI, this is a link to the email from 2012 with the patch
attached:

https://sourceforge.net/p/cc-mode/mailman/message/29722632/

This is a link to download the patch:

https://sourceforge.net/p/cc-mode/mailman/attachment/m2sjbfi7tl.fsf%40gmail.com/1/

I've included the patch itself below if you prefer that instead of the
above links.

Cheers!

--------------------------------
>From 3ea4329978ebe2e5cb9d4bfd1e544277cf8e0352 Mon Sep 17 00:00:00 2001
From: Leo Liu <sdl.web@gmail.com>
Date: Wed, 22 Aug 2012 16:54:18 +0800
Subject: [PATCH] Add ObjC 2.0 directives support

---
 lisp/progmodes/cc-langs.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 78be8ac2..4aed2048 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -1884,7 +1884,8 @@ (c-lang-defconst c-other-decl-kwds
 `c-<>-type-kwds', or `c-<>-arglist-kwds' then the associated clauses
 will be handled."
   t       nil
-  objc    '("@class" "@end" "@defs")
+  objc    '("@class" "@defs" "@end" "@property" "@dynamic" "@synthesize"
+           "@compatibility_alias")
   java    '("import" "package")
   pike    '("import" "inherit"))
 
@@ -2006,7 +2007,8 @@ (c-lang-defconst c-protection-kwds
   "Access protection label keywords in classes."
   t    nil
   c++  '("private" "protected" "public")
-  objc '("@private" "@protected" "@public"))
+  objc '("@private" "@protected" "@package" "@public"
+        "@required" "@optional"))
 
 (c-lang-defconst c-block-decls-with-vars
   "Keywords introducing declarations that can contain a block which
@@ -2176,7 +2178,7 @@ (c-lang-defconst c-block-stmt-1-kwds
   "Statement keywords followed directly by a substatement."
   t    '("do" "else")
   c++  '("do" "else" "try")
-  objc '("do" "else" "@finally" "@try")
+  objc '("do" "else" "@finally" "@try" "@autoreleasepool")
   java '("do" "else" "finally" "try")
   idl  nil)
 
@@ -2292,7 +2294,8 @@ (c-lang-defconst c-constant-kwds
   t       nil
   (c c++) '("NULL" ;; Not a keyword, but practically works as one.
            "false" "true")             ; Defined in C99.
-  objc    '("nil" "Nil" "YES" "NO" "NS_DURING" "NS_HANDLER" "NS_ENDHANDLER")
+  objc    '("nil" "Nil" "YES" "NO" "IBAction" "IBOutlet"
+           "NS_DURING" "NS_HANDLER" "NS_ENDHANDLER")
   idl     '("TRUE" "FALSE")
   java    '("true" "false" "null") ; technically "literals", not keywords
   pike    '("UNDEFINED")) ;; Not a keyword, but practically works as one.
-- 
1.7.12







reply via email to

[Prev in Thread] Current Thread [Next in Thread]