GNU bug report logs -
#2436
open-paren-in-column-0-is-defun-start and cc-mode
Previous Next
Reported by: Tom Tromey <tromey <at> redhat.com>
Date: Sun, 22 Feb 2009 18:35:04 UTC
Severity: minor
Fixed in version 24.4
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 2436 in the body.
You can then email your comments to 2436 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2436
; Package
emacs
.
(Sun, 22 Feb 2009 18:35:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tom Tromey <tromey <at> redhat.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sun, 22 Feb 2009 18:35:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
Save the attached file as "infcmd.c". (It comes from GNU gdb.)
Run emacs -q
Visit infcmd.c
Use M-> to go to the end of the buffer.
Notice that the font-locking is incorrect.
For me, the code at the end of the buffer is fontified as a string,
whereas it is actually a mix of strings and code. The badness starts
at line 2594.
I can work around the problem by removing a character (say, at the
start of line 2593) and then undoing.
FWIW, I checked out CVS Emacs and built it, and it exhibits this same bug.
[infcmd.c (text/plain, attachment)]
[Message part 3 (text/plain, inline)]
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/22.2/etc/DEBUG for instructions.
In GNU Emacs 22.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.12.9)
of 2008-05-23 on xenbuilder4.fedora.phx.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.10500000
configured using `configure '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-x-toolkit=gtk' '--with-sound' '--with-toolkit-scroll-bars' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i386-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables''
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: en_US.UTF-8
locale-coding-system: utf-8
default-enable-multibyte-characters: t
Major mode: Group
Minor modes in effect:
gnus-agent-mode: t
compilation-in-progress: (gid)
shell-dirtrack-mode: t
gnus-undo-mode: t
erc-menu-mode: t
erc-autojoin-mode: t
erc-ring-mode: t
erc-pcomplete-mode: t
erc-track-mode: t
erc-track-minor-mode: t
erc-match-mode: t
erc-button-mode: t
erc-fill-mode: t
erc-stamp-mode: t
erc-netsplit-mode: t
erc-spelling-mode: t
erc-truncate-mode: t
erc-status-mode: t
erc-services-mode: t
erc-irccontrols-mode: t
erc-noncommands-mode: t
erc-readonly-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
SPC p r a c t i c e . C-p C-k M-q C-c C-c C-p M S-SPC
M S-SPC q s C-u C-n SPC M-> Q y s C-z o M-v M-v M-v
C-v C-v C-v M-> <switch-frame> <switch-frame> <f10>
<f10> C-z o C-l C-u C-n C-u C-n SPC E q n n SPC 5 0
<return> M-> q SPC M-> C-u C-p C-u C-p C-u C-u E q
C-l C-u C-n C-u C-n C-u C-n n SPC 5 0 <return> M->
Q y n SPC M-> Q y n SPC 5 0 <return> M-> C-u C-p Q
y s M-v M-v M-v C-u C-u C-p n n n n M-g M-g M-g M-g
s C-u C-u C-p C-u C-p C-u C-p M-g M-g M-g M-g s C-z
o <f10> <f10> <f10> <switch-frame> <switch-frame> <f10>
<switch-frame> n n n C-l n n M-g M-g M-g M-g s n C-l
M-g M-g M-g p SPC <return> M-> SPC SPC C-z o <f10>
C-z o SPC SPC <backspace> SPC SPC SPC SPC SPC SPC SPC
SPC q M-g M-g s C-z o <f10> <f10> C-z o n M-g M-g s
SPC M-> E q SPC M-> q s <switch-frame> <f10> <f10>
<f10> I SPC d o n ' t SPC k n o w <return> <f10> C-x
b i n f r <tab> <return> M-> <f10> n i c e <return>
<f10> C-x C-v <return> M-> M-v M-v M-v M-v M-v M-v
M-v M-v M-v M-v M-v M-v M-v M-v M-v M-v M-v M-v M-v
M-v M-v M-v M-v <f10> <f10> M-v M-v M-v M-v M-v M-v
M-v M-v M-v M-v C-x b i n f c m d <tab> <return> M->
M-v C-x C-f C-g <switch-frame> M-x r e p o r t - e
m <tab> b <tab> <return>
Recent messages:
Scoring...done
Generating summary...done
Mark set
Expiring articles...done
(No changes need to be saved)
Saving /home/tromey/.newsrc.eld...
Saving file /home/tromey/.newsrc.eld...
Wrote /home/tromey/.newsrc.eld
Saving /home/tromey/.newsrc.eld...done
Mark set [3 times]
Quit
Tom
bug reassigned from package `emacs' to `emacs,cc-mode'.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Mon, 23 Feb 2009 22:45:05 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#2436
; Package
emacs,cc-mode
.
(Fri, 06 Mar 2009 19:40:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
bojohan+news <at> dd.chalmers.se (Johan Bockgård)
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
.
(Fri, 06 Mar 2009 19:40:04 GMT)
Full text and
rfc822 format available.
Message #12 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Tom Tromey <tromey <at> redhat.com> writes:
> Save the attached file as "infcmd.c". (It comes from GNU gdb.)
> Run emacs -q
> Visit infcmd.c
> Use M-> to go to the end of the buffer.
> Notice that the font-locking is incorrect.
>
> For me, the code at the end of the buffer is fontified as a string,
> whereas it is actually a mix of strings and code. The badness starts
> at line 2594.
Left Margin Paren strikes again.
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:
bug#2436
; Package
emacs,cc-mode
.
(Mon, 03 Oct 2011 19:49:01 GMT)
Full text and
rfc822 format available.
Message #15 received at 2436 <at> debbugs.gnu.org (full text, mbox):
As was pointed out, there is an unescaped left paren in column 0 (at
line 2560). If this is escaped, the problem goes away.
However, there does at least seem to be a documentation bug, because
cc-mode.texi's FAQ says:
@emph{I have an open paren character at column zero inside a comment or
multiline string literal, and it causes the fontification and/or
indentation to go haywire. What gives?}
[...]
This heuristic is built into the core syntax analysis routines in
(X)Emacs, so it's not really a @ccmode{} issue. However, in Emacs
21.1 it became possible to turn it off <at> footnote{Using the variable
@code{open-paren-in-column-0-is-defun-start}.} and @ccmode{} does so
there since it's got its own system to keep track of blocks.
However, open-paren-in-column-0-is-defun-start is true in c-mode.
It seems the relevant setting in cc-mode.el was commented out 2006/12/17.
Changed bug title to 'open-paren-in-column-0-is-defun-start and cc-mode' from 'cc mode font-locking -vs- multi-line strings'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 03 Oct 2011 20:12:01 GMT)
Full text and
rfc822 format available.
Severity set to 'minor' from 'normal'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 03 Oct 2011 20:12:01 GMT)
Full text and
rfc822 format available.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Mon, 20 Jan 2014 03:21:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tom Tromey <tromey <at> redhat.com>
:
bug acknowledged by developer.
(Mon, 20 Jan 2014 03:21:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 2436-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.4
Seems fixed by
http://lists.gnu.org/archive/html/emacs-diffs/2014-01/msg00246.html
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 17 Feb 2014 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 183 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.