From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: cc-mode enhancement for Objective-C Date: Sun, 14 Oct 2007 08:29:37 +0000 Message-ID: <20071014082937.GA2368@muc.de> References: <55f7df060710122343j6cc17fc8qa73ef5964fc4068a@mail.gmail.com> <20071013211325.GA1908@muc.de> <55f7df060710132308t6cb0d145taea3a916e19d6896@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1192350314 6534 80.91.229.12 (14 Oct 2007 08:25:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2007 08:25:14 +0000 (UTC) Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org To: Adrian Robert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 14 10:25:03 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IgymR-0002sN-Qp for ged-emacs-devel@m.gmane.org; Sun, 14 Oct 2007 10:25:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgymK-0001tV-OA for ged-emacs-devel@m.gmane.org; Sun, 14 Oct 2007 04:24:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IgymF-0001qp-Pf for emacs-devel@gnu.org; Sun, 14 Oct 2007 04:24:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IgymE-0001pd-W4 for emacs-devel@gnu.org; Sun, 14 Oct 2007 04:24:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgymE-0001pJ-Hp for emacs-devel@gnu.org; Sun, 14 Oct 2007 04:24:46 -0400 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IgymD-000857-RA for emacs-devel@gnu.org; Sun, 14 Oct 2007 04:24:46 -0400 Original-Received: (qmail 11318 invoked by uid 3782); 14 Oct 2007 08:24:43 -0000 Original-Received: from acm.muc.de (p57B1FA4E.dip.t-dialin.net [87.177.250.78]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sun, 14 Oct 2007 10:24:41 +0200 Original-Received: (qmail 3059 invoked by uid 1000); 14 Oct 2007 08:29:37 -0000 Content-Disposition: inline In-Reply-To: <55f7df060710132308t6cb0d145taea3a916e19d6896@mail.gmail.com> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:80842 Archived-At: Hi, Adrian, On Sun, Oct 14, 2007 at 09:08:36AM +0300, Adrian Robert wrote: > On 10/14/07, Alan Mackenzie wrote: > > Could I ask you two little favours? > > (i) Please prefix the names of all the variables with "c-"; e.g., change > > objc-method-arg-min-delta-to-bracket to > > c-objc-method-arg-min-delta-to-bracket. > OK.. it's been a while since I did this patch, so I'm not sure, I > think I may have been following the naming of "objc-method-intro", > "objc-method-args-cont", "objc-method-call-count" in cc-vars. However > I see these seem to be a different type of variable. `objc-method-intro' is a just a symbol, not a variable. It means "the line you pressed C-c C-s on is 'The first line of an Objective-C method definition'". These symbols are documented in the manual (CC Mode 5.31 version) on the page "Syntactic Symbols". > So the different naming convention should be used? Or is it best to > change the older three variables to 'c-objc-...'? "c-" is the naming prefix for _all_ variables and functions within CC Mode, with the exception of (most of) the mode names c++-mode, objc-mode, ..... > For now, here is a context diff version of the patch as-is. Many thanks! That's a lot easier to look at. One thing I forgot to ask you for is a test case - a little file.m, perhaps ~10 lines long, which exercises the new indentation and fontification. This will then become part of the CC Mode test suite. If you're not familiar with this, have a look at some of the files in: . > -Adrian -- Alan.