From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ari Roponen Newsgroups: gmane.emacs.bugs Subject: bug#5747: 24.0.50; Unstable C-mode indentation Date: Mon, 22 Mar 2010 14:03:39 +0200 Message-ID: References: <20100322113631.GA1741@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1269260727 23485 80.91.229.12 (22 Mar 2010 12:25:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 22 Mar 2010 12:25:27 +0000 (UTC) Cc: Paul@debbugs.gnu.org, 5747@debbugs.gnu.org, Chong Yidong , Pogonyshev To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 22 13:25:22 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ntgh7-0007O4-Nt for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Mar 2010 13:25:22 +0100 Original-Received: from localhost ([127.0.0.1]:34991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ntgh6-0000vr-Q7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Mar 2010 08:25:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ntgh1-0000vT-JY for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2010 08:25:15 -0400 Original-Received: from [140.186.70.92] (port=60454 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ntggx-0000u5-7A for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2010 08:25:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ntggv-0004HC-S3 for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2010 08:25:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58209) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ntggv-0004H2-QM for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2010 08:25:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NtgMT-00027s-Ta; Mon, 22 Mar 2010 08:04:01 -0400 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Ari Roponen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Mar 2010 12:04:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-GNU-PR-Message: followup 5747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5747-submit@debbugs.gnu.org id=B5747.12692594278163 (code B ref 5747); Mon, 22 Mar 2010 12:04:01 +0000 Original-Received: (at 5747) by debbugs.gnu.org; 22 Mar 2010 12:03:47 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NtgMF-00027c-IR for submit@debbugs.gnu.org; Mon, 22 Mar 2010 08:03:47 -0400 Original-Received: from mail-ew0-f221.google.com ([209.85.219.221]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NtgMD-00027W-9m for 5747@debbugs.gnu.org; Mon, 22 Mar 2010 08:03:45 -0400 Original-Received: by ewy21 with SMTP id 21so1001492ewy.5 for <5747@debbugs.gnu.org>; Mon, 22 Mar 2010 05:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=amhcnm4Vr4HsLph9kra/lEDWvfzhYKpMEewmmL+In/o=; b=nC+MYVC3v5OfCcxAPxM6IjQppXJQfswi1O54AoVdTUOjU09c6FrHHSvJxJ5EgHkAWX FDze1P4EvNGSAy9Xf2P2HV82GG9bMUgL5Isbrvc0dlMe9eU1gpZFH4651zxHYZD/MG5I gAA5HbfWN4QXSELEvspfRAsDIqWIDo0i47ocQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=lQJTNCgKvR3kIT3erOmEZNwjOa4CfsEdHo+fcVb6xgQZnhm9egBHLtRa3Pqz1R+ikH I83C62Q48ZwV6voy1/uILuj5adFU+ZtVxbigzkJEf/UbyRZErJvc0YK8SeHIp1LJUZbs UzL37H8lI/Q657XAtvJarXXD27yTDXlAyq3qU= Original-Received: by 10.213.79.77 with SMTP id o13mr2475698ebk.4.1269259418438; Mon, 22 Mar 2010 05:03:38 -0700 (PDT) Original-Received: from arirop (dsl-jklbrasgw1-fecbdf00-152.dhcp.inet.fi [80.223.203.152]) by mx.google.com with ESMTPS id 14sm1907498ewy.14.2010.03.22.05.03.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 22 Mar 2010 05:03:37 -0700 (PDT) In-Reply-To: <20100322113631.GA1741@muc.de> (Alan Mackenzie's message of "Mon, 22 Mar 2010 11:36:31 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 22 Mar 2010 08:04:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35689 Archived-At: Hi, > Would you please (all) try the following patch, which I'm hopeful will > fix all the recent instabilities in CC Modes indentation. > this patch fixes the problem I reported. Thank you. > > *** cc-engine.el~ 2010-03-22 11:15:40.248931952 +0000 > --- cc-engine.el 2010-03-22 11:24:04.981200984 +0000 > *************** > *** 2624,2630 **** > (< (point-max) c-state-old-cpp-end))) > (point-max) > (min (point-max) c-state-old-cpp-beg))) > ! (while (and c-state-cache (> (c-state-cache-top-lparen) upper-lim)) > (setq c-state-cache (cdr c-state-cache))) > ;; If `upper-lim' is inside the last recorded brace pair, remove its > ;; RBrace and indicate we'll need to search backwards for a previous > --- 2624,2630 ---- > (< (point-max) c-state-old-cpp-end))) > (point-max) > (min (point-max) c-state-old-cpp-beg))) > ! (while (and c-state-cache (>= (c-state-cache-top-lparen) upper-lim)) > (setq c-state-cache (cdr c-state-cache))) > ;; If `upper-lim' is inside the last recorded brace pair, remove its > ;; RBrace and indicate we'll need to search backwards for a previous > -- Ari Roponen