From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#10480: 24.0.92; ?cc-mode breakage due to "Large brace-block initialisation makes CC?Mode slow: Fix" Date: Sun, 15 Jan 2012 09:59:41 +0000 Message-ID: <20120115095941.GA2910@acm.acm> References: <87vcois10w.fsf@socrates.bennee.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1326622045 311 80.91.229.12 (15 Jan 2012 10:07:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 15 Jan 2012 10:07:25 +0000 (UTC) Cc: 10480@debbugs.gnu.org To: Alex Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 15 11:07:21 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RmMzg-0003fB-RL for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Jan 2012 11:07:21 +0100 Original-Received: from localhost ([::1]:39649 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmMzg-0003Ai-6n for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Jan 2012 05:07:20 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:59210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmMzd-0003AY-G4 for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2012 05:07:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmMzc-0007eJ-Dq for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2012 05:07:17 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmMza-0007dx-Oh; Sun, 15 Jan 2012 05:07:14 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RmN0M-00006z-61; Sun, 15 Jan 2012 05:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 15 Jan 2012 10:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10480 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org, 10480@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1326622041376 (code B ref -1); Sun, 15 Jan 2012 10:08:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Jan 2012 10:07:21 +0000 Original-Received: from localhost ([127.0.0.1]:57882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RmMzh-000061-3R for submit@debbugs.gnu.org; Sun, 15 Jan 2012 05:07:21 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:39050) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RmMzf-00005u-6Y for submit@debbugs.gnu.org; Sun, 15 Jan 2012 05:07:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmMys-0007bq-CK for submit@debbugs.gnu.org; Sun, 15 Jan 2012 05:06:31 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:44431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmMys-0007bm-Aq for submit@debbugs.gnu.org; Sun, 15 Jan 2012 05:06:30 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:59115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmMyr-00037s-AV for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2012 05:06:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmMyp-0007bT-WB for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2012 05:06:29 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:50669 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmMyp-0007bL-MV for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2012 05:06:27 -0500 Original-Received: (qmail 37191 invoked by uid 3782); 15 Jan 2012 10:06:26 -0000 Original-Received: from acm.muc.de (pD951B011.dip.t-dialin.net [217.81.176.17]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 15 Jan 2012 11:06:21 +0100 Original-Received: (qmail 3007 invoked by uid 1000); 15 Jan 2012 09:59:41 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55762 Archived-At: In article you wrote: > > I'm currently tracking the Emacs BZR/GIT repo for the current bleeding > edge code. It seems it broke over Christmas. While editing C code I > was > constantly hit with back traces like the following: > Debugger entered--Lisp error: (args-out-of-range 10389 15607) > parse-partial-sexp(10389 15607) > c-literal-limits(nil nil t) > c-indent-new-comment-line(t) > default-indent-new-line(t) > do-auto-fill() > apply(do-auto-fill nil) > c-mask-paragraph(nil t do-auto-fill) > c-do-auto-fill() > self-insert-command(1) > newline() > newline-and-indent() > call-interactively(newline-and-indent nil nil) Sorry about this, and thanks for reporting the bug. > This often left emacs unusable, sometime wiping the current editing > buffer. Bisecting through the code tree I found it was the Large > brace-block fix that causes the regression. This looks to be the same as bug #10463 which has already been fixed. The fix was committed to the savannah repository on 2012-01-11, revision #106849. Would you please apply that bug's patch and let me know if it fails to fix the current bug. Here is that patch: *** orig/cc-engine.el 2012-01-09 20:27:51.000000000 +0000 --- cc-engine.el 2012-01-10 11:09:42.000000000 +0000 *************** *** 4225,4236 **** Note that this function might do hidden buffer changes. See the comment at the start of cc-engine.el for more info." ! (let* ((safe-place (c-state-safe-place (point))) ! (lit (c-state-pp-to-literal safe-place (point)))) ! (or (cadr lit) ! (and detect-cpp ! (save-excursion (c-beginning-of-macro)) ! 'pound)))) (defun c-literal-limits (&optional lim near not-in-delimiter) "Return a cons of the beginning and end positions of the comment or --- 4225,4238 ---- Note that this function might do hidden buffer changes. See the comment at the start of cc-engine.el for more info." ! (save-restriction ! (widen) ! (let* ((safe-place (c-state-safe-place (point))) ! (lit (c-state-pp-to-literal safe-place (point)))) ! (or (cadr lit) ! (and detect-cpp ! (save-excursion (c-beginning-of-macro)) ! 'pound))))) (defun c-literal-limits (&optional lim near not-in-delimiter) "Return a cons of the beginning and end positions of the comment or *************** *** 4250,4258 **** (save-excursion (let* ((pos (point)) (lim (or lim (c-state-safe-place pos))) ! (pp-to-lit (c-state-pp-to-literal lim pos)) (state (car pp-to-lit)) - (lit-type (cadr pp-to-lit)) (lit-limits (car (cddr pp-to-lit)))) (cond --- 4252,4261 ---- (save-excursion (let* ((pos (point)) (lim (or lim (c-state-safe-place pos))) ! (pp-to-lit (save-restriction ! (widen) ! (c-state-pp-to-literal lim pos))) (state (car pp-to-lit)) (lit-limits (car (cddr pp-to-lit)))) (cond > Regards, > Alex -- Alan Mackenzie (Nuremberg, Germany).