From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.bugs Subject: bug#5953: 23.1.95; objc-mode doesn't fontify Objective-C 2.0 keywords @syntesize and @property correctly Date: Wed, 22 Aug 2012 17:39:50 +0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1345628462 21314 80.91.229.3 (22 Aug 2012 09:41:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Aug 2012 09:41:02 +0000 (UTC) Cc: 5953@debbugs.gnu.org To: Aleksandr Skobelev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 22 11:40:58 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T47Qn-0002ZU-Bf for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Aug 2012 11:40:57 +0200 Original-Received: from localhost ([::1]:38610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T47Ql-0006mS-QL for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Aug 2012 05:40:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T47Qf-0006mI-V8 for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2012 05:40:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T47QZ-0004vf-Pp for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2012 05:40:49 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T47QV-0004v6-08; Wed, 22 Aug 2012 05:40:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T47Qs-0001W7-Au; Wed, 22 Aug 2012 05:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Wed, 22 Aug 2012 09:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5953 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: X-Debbugs-Original-Cc: 5953@debbugs.gnu.org, bug-cc-mode@gnu.org Original-Received: via spool by 5953-submit@debbugs.gnu.org id=B5953.13456284405802 (code B ref 5953); Wed, 22 Aug 2012 09:41:02 +0000 Original-Received: (at 5953) by debbugs.gnu.org; 22 Aug 2012 09:40:40 +0000 Original-Received: from localhost ([127.0.0.1]:42643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T47QS-0001VT-BJ for submit@debbugs.gnu.org; Wed, 22 Aug 2012 05:40:40 -0400 Original-Received: from mail-pz0-f44.google.com ([209.85.210.44]:39817) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T47QM-0001VI-1N for 5953@debbugs.gnu.org; Wed, 22 Aug 2012 05:40:35 -0400 Original-Received: by dadf8 with SMTP id f8so560474dad.3 for <5953@debbugs.gnu.org>; Wed, 22 Aug 2012 02:40:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=eApiEJTOrt6bVn7hu4SZc8XudeD/ErNMbm7Tu23Txvc=; b=EW6ePCzXIzuI1syX59IoJjccaHoOnXU0ltehycK50SOp7udi+RZl8nuSTL4gHNSBsJ peq019WAR00FwBToRzkO6WCfJ2pT4lxzymc6QA1/Z0ClkPJ8dGX3tdNG1qt8fXJmSThI SSEshVFbBUHj+2FwJqUDRGhhJREZceRtzFq9Xud2cG3Ax2p15M2pFzlA/lHD+sZGhoMb oyd4Exk9Lqwz8CwDmFH/7Y3FfptI9cA60GEvHo1o/yoFBkM799tIxRh4B/Udz5BBOIIn MyLwMVxBKS1cIrcpPb0hKPJvlIBWaJp3vagHBxRddx24CVCxeA106g3+9k7QAHrlv5kG ar4Q== Original-Received: by 10.66.88.198 with SMTP id bi6mr44704136pab.23.1345628405375; Wed, 22 Aug 2012 02:40:05 -0700 (PDT) Original-Received: from localhost ([216.185.105.36]) by mx.google.com with ESMTPS id ho7sm1017797pbc.3.2012.08.22.02.40.01 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Aug 2012 02:40:04 -0700 (PDT) In-Reply-To: (Leo's message of "Wed, 22 Aug 2012 11:32:25 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (OS X 10.8) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63390 Archived-At: --=-=-= Content-Type: text/plain On 2012-08-22 11:32 +0800, Leo wrote: > Here is a list of OjbC2.0 directives with annotations: > > http://maniacdev.com/cheatsheetobjccd.pdf > > Leo I have compiled a patch to improve support for Objective C. I am not sure where to add the following keywords so they live in c-other-decl-kwds for now. Please review the patch. Thanks. 1. @property : @property (attributes) Type propertyName; 2. @dynamic : @dynamic aProperty, bProperty; 3. @synthesize : @synthesize aProperty, bProperty, cProperty=_ivar; 4. @compatibility_alias : @compatibility_alias AliasClassName ExistingClassName; --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-ObjC-2.0-directives-support.patch Content-Description: 0001-Add-ObjC-2.0-directives-support.patch >From 3ea4329978ebe2e5cb9d4bfd1e544277cf8e0352 Mon Sep 17 00:00:00 2001 From: Leo Liu 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 --=-=-=--