GNU bug report logs -
#7173
hang with non-standard defun-prompt-regexp in cc-mode
Previous Next
Reported by: jakehartman <at> gmail.com
Date: Thu, 7 Oct 2010 23:51:02 UTC
Severity: normal
Found in version 23.2
Fixed in version 24.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7173 in the body.
You can then email your comments to 7173 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7173
; Package
emacs
.
(Thu, 07 Oct 2010 23:51:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
jakehartman <at> gmail.com
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 07 Oct 2010 23:51:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Emacs 23.2.1 hangs when I try to open a file containing the following C code:
cat <<EOF >test.c
int a;
void f(int x) {}
EOF
emacs test.c
Note the space preceding the first line. The content of the first
line doesn't seem to matter: so long as it starts with a space, emacs
hangs. If I remove that space, the file opens successfully. However,
if I then enter a space at the start of the first line, emacs will
hang after a second or two -- about the amount of time between font
lock updates.
By hangs I mean stops responding and takes up 100% CPU. Caught in an
infinite loop.
My stripped-down .emacs file reads as follows:
(c-add-style "my-cstyle" '(
(defun-prompt-regexp . " ")))
(defun apply-my-cstyles ()
(c-set-style "my-cstyle"))
(add-hook 'c-mode-common-hook 'apply-my-cstyles)
The problem is trivially solved by setting defun-prompt-regexp to nil.
I'm not sure why it was a space in the first place, as I never put a
space before the curly brace starting a function. But there might be
some weirdos out there who do, so I figured I'd report the bug for
their benefit.
Cheers,
Jake
In GNU Emacs 23.2.1 (x86_64-apple-darwin10.4.0, X toolkit)
of 2010-10-07 on bakers.aoc-vis.nrao.edu
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure '--prefix=/opt/local' '--infodir'
'/opt/local/share/info/emacs' '--without-dbus' '--without-gconf'
'--with-x-toolkit=lucid' '--without-xaw3d' '--without-carbon'
'--with-xpm' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png'
'CC=/usr/bin/gcc-4.2' 'CFLAGS=-pipe -O2 -arch x86_64'
'LDFLAGS=-L/opt/local/lib -arch x86_64'
'CPPFLAGS=-I/opt/local/include''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
value of $XMODIFIERS: nil
locale-coding-system: nil
default enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
tooltip-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-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<escape> x r e p o r t - e m <tab> <return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
call-interactively: End of buffer
Quit
Saving file /Users/jhartman/.emacs...
Wrote /Users/jhartman/.emacs
Non-character input-event
Saving file /Users/jhartman/.emacs...
Wrote /Users/jhartman/.emacs
Load-path shadows:
None found.
Features:
(shadow sort mail-extr message idna ecomplete rfc822 mml easymenu
mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util
netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock
sha1 hex-util hashcash mail-utils emacsbug multi-isearch cc-styles
cc-align cc-engine cc-vars cc-defs regexp-opt tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mldrag 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 loaddefs button minibuffer faces
cus-face files text-properties overlay md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote
make-network-process font-render-setting x-toolkit x multi-tty emacs)
--
Changed bug title to 'hang with non-standard defun-prompt-regexp in cc-mode' from '23.2; cc-mode hangs, likely during font lock'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 03 Oct 2011 20:46:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Mon, 03 Oct 2011 20:46:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
jakehartman <at> gmail.com
:
bug acknowledged by developer.
(Mon, 03 Oct 2011 20:46:03 GMT)
Full text and
rfc822 format available.
Message #12 received at 7173-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.1
I can reproduce this in 23.3, but not in the current trunk, so it
seems to have been fixed.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 01 Nov 2011 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 290 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.