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, 31 Dec 2006 17:40:52 +0800 Message-ID: References: <20061230212715.GA1198@muc.de> 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 1167559444 17058 80.91.229.12 (31 Dec 2006 10:04:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 31 Dec 2006 10:04:04 +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 Dec 31 11:04:03 2006 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 1H0xXu-0008Rr-OQ for sf-cc-mode-help@m.gmane.org; Sun, 31 Dec 2006 11:04:03 +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 13EF8120C8; Sun, 31 Dec 2006 02:04:02 -0800 (PST) Original-Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1H0xXs-0004v2-3Y for cc-mode-help@lists.sourceforge.net; Sun, 31 Dec 2006 02:04:00 -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 1H0xXr-0002IW-9G for cc-mode-help@lists.sourceforge.net; Sun, 31 Dec 2006 02:04:00 -0800 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1H0xXZ-000373-TU for bug-cc-mode@gnu.org; Sun, 31 Dec 2006 05:03:41 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.52) id 1H0xXn-0003Ep-OY for bug-cc-mode@gnu.org; Sun, 31 Dec 2006 05:03:57 -0500 Original-Received: from [65.54.246.212] (helo=bay0-omc3-s12.bay0.hotmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H0xBZ-0008Cn-Ra; Sun, 31 Dec 2006 04:40:58 -0500 Original-Received: from hotmail.com ([64.4.26.25]) by bay0-omc3-s12.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Sun, 31 Dec 2006 01:40:57 -0800 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 31 Dec 2006 01:40:56 -0800 Original-Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with HTTP; Sun, 31 Dec 2006 09:40:52 GMT X-Originating-IP: [202.165.107.100] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: <20061230212715.GA1198@muc.de> Original-To: acm@muc.de, xugp@alibaba-inc.com X-OriginalArrivalTime: 31 Dec 2006 09:40:56.0841 (UTC) FILETIME=[C5921790:01C72CBF] 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:4260 gmane.emacs.devel:64558 Archived-At: And is this a bug too? For the following class definition: class a_b::c_d1 : public e_f, public g_h { -!-}; Suppose -!- represents the location of point. `c-beginning-of-defun' moves point to class a_b::c_d1 : -!-public e_f, public g_h { }; Rather than -!-class a_b::c_d1 : public e_f, public g_h { }; Thanks in advance. Regards, Guanpeng Xu >From: Alan Mackenzie >To: Herbert Euler >CC: bug-cc-mode@gnu.org, herberteuler@hotmail.com, rms@gnu.org, >emacs-devel@gnu.org >Subject: Re: On the behavior of `c-beginning-of-defun' >Date: Sat, 30 Dec 2006 21:27:15 +0000 > >Hi, Guanpeng! > >On Sat, Dec 30, 2006 at 12:09:55PM +0800, Herbert Euler wrote: > > Hello Alan, > >[ .... ] > > > I planned to use `c-beginning-of-defun' and `c-end-of-defun'. But I > > found a strange behavior of `c-beginning-of-defun'. In the attatched > > `x.c' file, `c-beginning-of-defun' moves point differently for the > > function `main' and others. For the `main' function, it moves point > > to the open of the function body, i.e. before the { at line 6; for > > other functions, it moves point to the beginning of the definition of > > the function, i.e. before the type specification of the return value > > of the function. > >[ .... ] > > > Is this a bug or a desired behavior of `c-beginning-of-defun'? > >The behaviour of c-beginning-of-defun in your `main' function is a bug. >c-b-o-d should go to before "int \nmain". As you wrote, the square >brackets in "*argv[]" is confusing the function. Thanks for reporting >this bug! > >I'll try and fix it soon. > > > Please reply to both this mail address (xugp@alibaba-inc.com) and my > > orignal mail address (herberteuler@hotmail.com) if possible. > > > Thanks in advance. > > > Regards, > > Guanpeng Xu > > > > int > > main (argc, argv) > > int argc; > > char *argv[]; > > { > > if () > > ; > > } > >[ .... ] > >-- >Alan Mackenzie (Ittersbach, Germany) _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ ------------------------------------------------------------------------- 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