From: Alan Mackenzie <acm@muc.de>
To: Alex <alex@bennee.com>
Cc: 10480@debbugs.gnu.org
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 [thread overview]
Message-ID: <20120115095941.GA2910@acm.acm> (raw)
In-Reply-To: <mailman.1652.1326301490.15002.bug-gnu-emacs@gnu.org>
In article <mailman.1652.1326301490.15002.bug-gnu-emacs@gnu.org> 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).
prev parent reply other threads:[~2012-01-15 9:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-11 15:37 bug#10480: 24.0.92; cc-mode breakage due to "Large brace-block initialisation makes CC Mode slow: Fix" Alex
[not found] ` <mailman.1652.1326301490.15002.bug-gnu-emacs@gnu.org>
2012-01-15 9:59 ` Alan Mackenzie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120115095941.GA2910@acm.acm \
--to=acm@muc.de \
--cc=10480@debbugs.gnu.org \
--cc=alex@bennee.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.