From: Alan Mackenzie <acm@muc.de>
To: gnu-emacs-bug@moderators.isc.org
Subject: bug#18306: 24.4.50; emacs 24.4.5 hangs in c-mode with '[' character
Date: Sat, 23 Aug 2014 11:18:37 +0000 (UTC) [thread overview]
Message-ID: <lt9tad$2dqd$1__17985.1654371761$1408793622$gmane$org@colin.muc.de> (raw)
In-Reply-To: <53F553DD.5000509@wordtronix.org>
Hi, Nick.
nick <nick@wordtronix.org> wrote:
> While in c-mode writing the line: char s[]; emacs hangs without update.
> Obviously not happening in this bugreport mode. :/ .
Yes, there was an infinite loop down in the fontification code. I think
it's fixed now. Would you please try it out and confirm that it is
indeed fixed. Either download and build the latest trunk, or apply this
patch:
diff -r 2cd4e65a2f5a cc-fonts.el
--- a/cc-fonts.el Sat Aug 02 18:12:32 2014 +0000
+++ b/cc-fonts.el Sat Aug 23 10:36:15 2014 +0000
@@ -1088,14 +1088,11 @@
;; initializing brace lists.
(let (found)
(while
- (and (setq found
- (c-syntactic-re-search-forward
- "[;,]\\|\\s)\\|\\'\\|\\(=\\|\\s(\\)" limit t t))
- (eq (char-before) ?\[))
- (backward-char)
- (c-safe (c-forward-sexp 1))
- (setq found nil)
- (setq brackets-after-id t))
+ (and (setq found (c-syntactic-re-search-forward
+ "[;,]\\|\\s)\\|\\'\\|\\(=\\|\\s(\\)" limit t t))
+ (eq (char-before) ?\[)
+ (c-go-up-list-forward))
+ (setq brackets-after-id t))
found))
(setq next-pos (match-beginning 0)
Thanks for taking to trouble to report this bug.
--
Alan Mackenzie (Nuremberg, Germany).
prev parent reply other threads:[~2014-08-23 11:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.7302.1408591517.1147.bug-gnu-emacs@gnu.org>
2014-08-21 2:05 ` bug#18306: 24.4.50; emacs 24.4.5 hangs in c-mode with '[' character nick
2014-08-23 11:18 ` 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='lt9tad$2dqd$1__17985.1654371761$1408793622$gmane$org@colin.muc.de' \
--to=acm@muc.de \
--cc=gnu-emacs-bug@moderators.isc.org \
/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.