GNU bug report logs -
#5350
23.1.91; error in c++-mode highlighting/indentation
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5350 in the body.
You can then email your comments to 5350 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#5350
; Package
emacs
.
(Sun, 10 Jan 2010 14:33:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jose Antonio Ortega Ruiz <jao <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 10 Jan 2010 14:33:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi, this is a bugs somewhere in c-mode syntactic analyser (or so it
seems). It happens to me in several circumstances; below i describe a
simple instance for a C++ file (i've seen it happening also in pure C
files).
1) Start emacs with -nw and -Q
2) Create a new C++ file, say test.cpp
3) Insert the following text:
/* Copyright (C) 2009, 2100 Foo Industries */
#include <libPlasma/c++/Pool.h>
4) When pressing the closing '>' an error occurs with the following
backtrace:
Debugger entered--Lisp error: (args-out-of-range 79 80)
put-text-property(79 80 category c-cpp-delimiter)
byte-code("\306 \307\211\307\310\211\310\211
\310\311\216\312\211T\313\314$\210)\312\211T\313\314$\210.\310\207" [modified buffer-undo-list inhibit-read-only inhibit-point-motion-hooks before-change-functions after-change-functions buffer-modified-p t nil ((byte-code "\204
\301 \203
\302\303!\210\303\207" [modified buffer-modified-p set-buffer-modified-p nil] 2)) put-text-property category c-cpp-delimiter deactivate-mark buffer-file-name buffer-file-truename here-cpp-beg -pos- here-cpp-end] 6)
top-level()
call-interactively(top-level nil nil)
recursive-edit()
byte-code("\306 @\307=\203! \310\311\312\"\210\313\311!\211A@)\242\314=\203! \310\315\312\"\210\316!\210\317 \210\320 !\210\f\203d \321ed\"
V\203W eb\210\322
\245y\210`db\210\322
\245
Zy\210`|\210)\323c\210eb\210\324\325\326 \"\210\327\306!\210\324\330!\210\331\312\324\330!\210\212\332 \210+\331\207" [unread-command-char debugger-args x debugger-buffer noninteractive debugger-batch-max-lines -1 debug backtrace-debug 4 t backtrace-frame lambda 5 pop-to-buffer debugger-mode debugger-setup-buffer count-lines 2 "...\n" message "%s" buffer-string kill-emacs "" nil recursive-edit middlestart buffer-read-only standard-output] 4)
debug(error (args-out-of-range 79 80))
remove-text-properties(79 80 (category nil))
c-parse-state()
c-syntactic-skip-backward("^<;}" nil t)
c-electric-lt-gt(nil)
call-interactively(c-electric-lt-gt nil nil)
In GNU Emacs 23.1.91.1 (i486-pc-linux-gnu, GTK+ Version 2.18.5)
of 2010-01-06 on elegiac, modified by Debian
(emacs-snapshot package, version 1:20100106-1)
configured using `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.1.91/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1.91/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''
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
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: C++/l
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
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Recent input:
C-x C-f t m p / i n d e n x DEL t - b u g DEL DEL DEL
DEL DEL DEL DEL DEL DEL DEL c p p - DEL DEL DEL m o
d e . c p p RET C-y / * SPC C o p y r i g h t SPC (
C ) SPC 2 0 0 9 , SPC 2 0 1 0 SPC O b l o n g SPC I
n d u s t r i e s SPC * / RET RET RET # DEL # i n c
l u e d e DEL DEL DEL C-a C-k C-p C-p C-p C-k / * SPC
C o p y r i g h t SPC ( c ) DEL DEL C ) SPC 2 0 0 9
, SPC 2 1 0 0 SPC F o o SPC I n d u s t r i e s SPC
* / RET RET # i n c l u d e SPC < l i b P l a s m a
/ c + + / P o o l . h > ESC x c - m o TAB TAB - r TAB
DEL DEL DEL DEL DEL DEL DEL DEL r e p o TAB t TAB DEL
r TAB RET
Recent messages:
("emacs")
For information about GNU Emacs and the GNU system, type C-h C-a.
(New file)
Mark set
current-kill: Kill ring is empty
c-neutralize-syntax-in-and-mark-CPP: Args out of range: 53, 54Error during redisplay: (args-out-of-range 58 59)
byte-code: Args out of range: 79, 80
Auto-saving...
Making completion list...
Load-path shadows:
/usr/share/emacs/23.1.91/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs/23.1.91/site-lisp/ruby1.8-elisp/ruby-mode hides /usr/share/emacs/23.1.91/lisp/progmodes/ruby-mode
/usr/share/emacs/23.1.91/site-lisp/prolog-el/prolog hides /usr/share/emacs/23.1.91/lisp/progmodes/prolog
Features:
(shadow sort mail-extr message sendmail ecomplete rfc822 mml 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 help-mode view cc-mode cc-fonts
easymenu cc-menus cc-cmds 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 dbusbind font-render-setting gtk
x-toolkit x multi-tty emacs)
bug reassigned from package 'emacs' to 'emacs,cc-mode'.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 11 Jan 2010 06:31:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5350
; Package
emacs,cc-mode
.
(Wed, 20 Jan 2010 12:58:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 5350 <at> debbugs.gnu.org (full text, mbox):
Hi, Jose,
On Sun, Jan 10, 2010 at 03:18:27PM +0100, Jose Antonio Ortega Ruiz wrote:
> Hi, this is a bugs somewhere in c-mode syntactic analyser (or so it
> seems). It happens to me in several circumstances; below i describe a
> simple instance for a C++ file (i've seen it happening also in pure C
> files).
> 1) Start emacs with -nw and -Q
> 2) Create a new C++ file, say test.cpp
> 3) Insert the following text:
> /* Copyright (C) 2009, 2100 Foo Industries */
>
> #include <libPlasma/c++/Pool.h>
> 4) When pressing the closing '>' an error occurs with the following
> backtrace:
I've just committed a patch which I think fixes this. Either update your
bzr version of Emacs, or apply the following patch (and then byte-compile
cc-langs.el, cc-engine.el, and cc-mode.el):
*** cc-defs.el~ 2010-01-19 13:24:48.000000000 +0000
--- cc-defs.el 2010-01-19 17:23:44.000000000 +0000
***************
*** 1217,1228 ****
;; This macro does a hidden buffer change.
`(progn
(c-put-char-property ,beg 'category 'c-cpp-delimiter)
! (c-put-char-property ,end 'category 'c-cpp-delimiter)))
(defmacro c-clear-cpp-delimiters (beg end)
;; This macro does a hidden buffer change.
`(progn
(c-clear-char-property ,beg 'category)
! (c-clear-char-property ,end 'category)))
(defsubst c-comment-out-cpps ()
;; Render all preprocessor constructs syntactically commented out.
--- 1217,1230 ----
;; This macro does a hidden buffer change.
`(progn
(c-put-char-property ,beg 'category 'c-cpp-delimiter)
! (if (< ,end (point-max))
! (c-put-char-property ,end 'category 'c-cpp-delimiter))))
(defmacro c-clear-cpp-delimiters (beg end)
;; This macro does a hidden buffer change.
`(progn
(c-clear-char-property ,beg 'category)
! (if (< ,end (point-max))
! (c-clear-char-property ,end 'category))))
(defsubst c-comment-out-cpps ()
;; Render all preprocessor constructs syntactically commented out.
--
Alan Mackenzie (Nuremberg, Germany).
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5350
; Package
emacs,cc-mode
.
(Wed, 20 Jan 2010 15:25:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 5350 <at> debbugs.gnu.org (full text, mbox):
Alan Mackenzie <acm <at> muc.de> writes:
> I've just committed a patch which I think fixes this. Either update your
> bzr version of Emacs, or apply the following patch (and then byte-compile
> cc-langs.el, cc-engine.el, and cc-mode.el):
Yes, the bug seems to be fixed now. Thanks!
bug closed, send any further explanations to Jose Antonio Ortega Ruiz <jao <at> gnu.org>
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> debbugs.gnu.org
.
(Wed, 20 Jan 2010 15:26:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <bug-gnu-emacs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 18 Feb 2010 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 177 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.