From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: Re: On the behavior of `c-beginning-of-defun' Date: Sun, 21 Jan 2007 09:22:49 +0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1169342588 31143 80.91.229.12 (21 Jan 2007 01:23:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 21 Jan 2007 01:23:08 +0000 (UTC) Cc: bug-cc-mode@gnu.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Sun Jan 21 02:23:05 2007 Return-path: Envelope-to: sf-cc-mode-help@m.gmane.org Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by lo.gmane.org with esmtp (Exim 4.50) id 1H8RQB-0001rb-Im for sf-cc-mode-help@m.gmane.org; Sun, 21 Jan 2007 02:22:59 +0100 Original-Received: from sc8-sf-list1-new.sourceforge.net (sc8-sf-list1-new-b.sourceforge.net [10.3.1.93]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id A5E7F12088; Sat, 20 Jan 2007 17:22:58 -0800 (PST) Original-Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1H8RQ9-0002rz-7O for cc-mode-help@lists.sourceforge.net; Sat, 20 Jan 2007 17:22:57 -0800 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1H8RQ8-00018T-Fu for cc-mode-help@lists.sourceforge.net; Sat, 20 Jan 2007 17:22:57 -0800 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1H8RPO-00019h-E1 for bug-cc-mode@gnu.org; Sat, 20 Jan 2007 20:22:10 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.52) id 1H8RQ6-0002HJ-Dj for bug-cc-mode@gnu.org; Sat, 20 Jan 2007 20:22:55 -0500 Original-Received: from [65.54.246.203] (helo=bay0-omc3-s3.bay0.hotmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H8RQ6-0002H9-2e; Sat, 20 Jan 2007 20:22:54 -0500 Original-Received: from hotmail.com ([64.4.26.37]) by bay0-omc3-s3.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Sat, 20 Jan 2007 17:22:53 -0800 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 20 Jan 2007 17:22:52 -0800 Original-Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with HTTP; Sun, 21 Jan 2007 01:22:49 GMT X-Originating-IP: [221.220.240.107] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: Original-To: herberteuler@hotmail.com, acm@muc.de, xugp@alibaba-inc.com X-OriginalArrivalTime: 21 Jan 2007 01:22:52.0999 (UTC) FILETIME=[AC166D70:01C73CFA] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on monty-python X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=MSGID_FROM_MTA_HEADER autolearn=failed version=3.0.4 X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.8 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: cc-mode-help-bounces@lists.sourceforge.net Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.cc-mode.general:4348 gmane.emacs.devel:65338 Archived-At: All functions are in the attached file. I'm sorry I forgot to declare this. Best regards, Guanpeng Xu >From: "Herbert Euler" >To: acm@muc.de, xugp@alibaba-inc.com >CC: bug-cc-mode@gnu.org, rms@gnu.org, emacs-devel@gnu.org >Subject: Re: On the behavior of `c-beginning-of-defun' >Date: Sun, 21 Jan 2007 09:19:44 +0800 > >>Please try out the amended version and let me know if anything's not >>right. > >I did not test all cases but only the case that function >`c-beginning-of-defun' fails. I think it is almost Ok. However, >please try the following case, it might be a bug. > >Suppose `-!-' indicates the position of point. If point is, for >example, in the body of function `main1': > > /* 1. K&R C. */ > > /* This will not get correct result until the bug in CC mode is fixed. > See > http://lists.gnu.org/archive/html/emacs-devel/2006-12/msg01341.html >*/ > int > main1 (argc, argv) > int argc; > char *argv[]; > { > -!-/* ... */ > } > >Then `c-beginning-of-defun' moves point to before ``int'': > > /* 1. K&R C. */ > > /* This will not get correct result until the bug in CC mode is fixed. > See > http://lists.gnu.org/archive/html/emacs-devel/2006-12/msg01341.html >*/ > -!-int > main1 (argc, argv) > int argc; > char *argv[]; > { > /* ... */ > } > >Which is a desired behavior. But if point is just after ``[]'': > > /* 1. K&R C. */ > > /* This will not get correct result until the bug in CC mode is fixed. > See > http://lists.gnu.org/archive/html/emacs-devel/2006-12/msg01341.html >*/ > int > main1 (argc, argv) > int argc; > char *argv[]-!-; > { > /* ... */ > } > >`c-beginning-of-defun' moves point to the start of the file, rather >than the desired position. > >This is the only problem I can see until now. Thank you very much. > >Regards, >Guanpeng Xu > >_________________________________________________________________ >FREE pop-up blocking with the new MSN Toolbar - get it now! >http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ ><< x.c >> >_______________________________________________ >Emacs-devel mailing list >Emacs-devel@gnu.org >http://lists.gnu.org/mailman/listinfo/emacs-devel _________________________________________________________________ Don't just search. Find. Check out the new MSN Search! http://search.msn.com/ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV