* bug#18306: 24.4.50; emacs 24.4.5 hangs in c-mode with '[' character
@ 2014-08-21 2:05 ` nick
2014-08-23 11:18 ` Alan Mackenzie
0 siblings, 1 reply; 2+ messages in thread
From: nick @ 2014-08-21 2:05 UTC (permalink / raw)
To: 18306
From: nick <nick@wordtronix.org>
To: bug-gnu-emacs@gnu.org
Subject: 24.4.50; emacs 24.4.5 hangs in c-mode with '[' character
--text follows this line--
While in c-mode writing the line: char s[]; emacs hangs without update.
Obviously not happening in this bugreport mode. :/ .
file started with : emacs -Q polak_calc.c
same behavior with: emacs polak_calc.c
This emacs was build from src on Fedora 20 from current github srcs.
Only warning was for a GTK multiple window message.
Tried: C-h k [ and received output : [ is undefined
Tried: make distclean , configure make su make install
Have not tried GDB or other debug methods while running.
In GNU Emacs 24.4.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9)
of 2014-08-20 on localhost.localdomain
Windowing system distributor `Fedora Project', version 11.0.11404000
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: C/l
Minor modes in effect:
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
abbrev-mode: t
Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<menu-bar> <help-menu> <send-emacs-bug-report>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
polak_calc.c has auto save data; consider M-x recover-this-file
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils cc-langs cl-loaddefs cl-lib
cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs time-date tooltip electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)
Memory information:
((conses 16 107055 6788)
(symbols 48 20371 0)
(miscs 40 43 110)
(strings 32 17650 4546)
(string-bytes 1 597372)
(vectors 16 11719)
(vector-slots 8 412326 5631)
(floats 8 70 262)
(intervals 56 241 0)
(buffers 976 12)
(heap 1024 24438 1023))
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#18306: 24.4.50; emacs 24.4.5 hangs in c-mode with '[' character
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
0 siblings, 0 replies; 2+ messages in thread
From: Alan Mackenzie @ 2014-08-23 11:18 UTC (permalink / raw)
To: gnu-emacs-bug
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).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-23 11:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).