From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: Re: CC Mode 5.31.4 (C/l); c-end-of-defun broken Date: Wed, 18 Apr 2007 16:43:15 -0400 Message-ID: <87bqhlct24.fsf@stupidchicken.com> References: <87zm55sgea.fsf@stupidchicken.com> <20070418213146.GC2100@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 1176928888 32531 80.91.229.12 (18 Apr 2007 20:41:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Apr 2007 20:41:28 +0000 (UTC) Cc: bug-cc-mode@gnu.org, A Soare , emacs-devel@gnu.org, Andreas Schwab To: Alan Mackenzie Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Wed Apr 18 22:41:22 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 1HeGxq-0008Fg-F7 for sf-cc-mode-help@m.gmane.org; Wed, 18 Apr 2007 22:41:18 +0200 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 C877D128CD; Wed, 18 Apr 2007 13:41:17 -0700 (PDT) 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 1HeGxl-0001Y1-DT for cc-mode-help@lists.sourceforge.net; Wed, 18 Apr 2007 13:41:13 -0700 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1HeGxl-0007iN-38 for cc-mode-help@lists.sourceforge.net; Wed, 18 Apr 2007 13:41:13 -0700 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HeGvF-00031R-Nn for bug-cc-mode@gnu.org; Wed, 18 Apr 2007 16:38:37 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1HeGxi-0000SA-TS for bug-cc-mode@gnu.org; Wed, 18 Apr 2007 16:41:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.1.0 Original-Received: from cyd.mit.edu ([18.19.1.138]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HeGxi-0000Rm-MP; Wed, 18 Apr 2007 16:41:10 -0400 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id C1D0F4E45F; Wed, 18 Apr 2007 16:43:15 -0400 (EDT) In-Reply-To: <20070418213146.GC2100@muc.de> (Alan Mackenzie's message of "18 Apr 2007 22\:11\:37 +0200\, Wed\, 18 Apr 2007 22\:31\:46 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.98 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 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 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:4487 gmane.emacs.devel:69583 Archived-At: Hi Alan, > Could people please test this fix (which I haven't yet committed): The behavior seems to be correct, as far as I can tell. However: > ! ;; Look for struct or union or ... If we find one, it might > ! ;; be the return type of a function, or the like. Exclude > ! ;; this case. > ! (c-syntactic-re-search-forward > ! (concat "[;=\(\[{]\\|\\(" > ! c-opt-block-decls-with-vars-key > ! "\\)") > ! lim t t t) Do you really want to use `lim' here? That argument, if non-nil, is supposed to give a lower bound for the search, starting from point. I think the correct limit you are looking for is the original point where we started. (In fact, c-in-function-trailer-p is not called with a non-nil argument anywhere in Emacs, so this bug wouldn't show up, but it's better to be safe than sorry.) Similarly here: > ! (c-syntactic-re-search-forward "[;=\(\[{]" lim t t t) ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/