* bug#5395: cc-mode raises on typing '>' in #include
@ 2010-01-16 0:17 Daniel Colascione
2010-01-18 17:00 ` Chong Yidong
2010-01-20 10:34 ` Alan Mackenzie
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Colascione @ 2010-01-16 0:17 UTC (permalink / raw)
To: bug-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Check out latest Emacs BZR.
Start with -Q
Visit an arbitrary .cpp file
Type #include <foo>
After typing the closing '>', an error is raised. Here is the traceback
Debugger entered--Lisp error: (args-out-of-range 15 16)
remove-text-properties(15 16 (category nil))
(let ((pos here-cpp-end)) (remove-text-properties pos (1+ pos) (quote
...)))
(c-clear-char-property here-cpp-end (quote category))
(progn (c-clear-char-property here-cpp-beg (quote category))
(c-clear-char-property here-cpp-end (quote category)))
(c-clear-cpp-delimiters here-cpp-beg here-cpp-end)
(progn (c-clear-cpp-delimiters here-cpp-beg here-cpp-end)
(c-with-cpps-commented-out (c-parse-state-1)))
(unwind-protect (progn (c-clear-cpp-delimiters here-cpp-beg
here-cpp-end) (c-with-cpps-commented-out ...)) (and (not modified)
(buffer-modified-p) (set-buffer-modified-p nil)))
(let* ((modified ...) (buffer-undo-list t) (inhibit-read-only t)
(inhibit-point-motion-hooks t) before-change-functions
after-change-functions deactivate-mark buffer-file-name
buffer-file-truename) (unwind-protect (progn ... ...) (and ... ... ...)))
(c-save-buffer-state nil (c-clear-cpp-delimiters here-cpp-beg
here-cpp-end) (c-with-cpps-commented-out (c-parse-state-1)))
(unwind-protect (c-save-buffer-state nil (c-clear-cpp-delimiters
here-cpp-beg here-cpp-end) (c-with-cpps-commented-out ...))
(c-save-buffer-state nil (c-set-cpp-delimiters here-cpp-beg here-cpp-end)))
(c-with-all-but-one-cpps-commented-out here-cpp-beg here-cpp-end
(c-parse-state-1))
(if (and here-cpp-beg (> here-cpp-end here-cpp-beg))
(c-with-all-but-one-cpps-commented-out here-cpp-beg here-cpp-end
(c-parse-state-1)) (c-with-cpps-commented-out (c-parse-state-1)))
(progn (c-suppress-<->-as-parens) (if (and here-cpp-beg ...)
(c-with-all-but-one-cpps-commented-out here-cpp-beg here-cpp-end ...)
(c-with-cpps-commented-out ...)))
(unwind-protect (progn (c-suppress-<->-as-parens) (if ... ... ...))
(c-restore-<->-as-parens))
(c-with-<->-as-parens-suppressed (if (and here-cpp-beg ...)
(c-with-all-but-one-cpps-commented-out here-cpp-beg here-cpp-end ...)
(c-with-cpps-commented-out ...)))
(prog1 (c-with-<->-as-parens-suppressed (if ... ... ...)) (setq
c-state-old-cpp-beg here-cpp-beg c-state-old-cpp-end here-cpp-end))
(let (here-cpp-beg here-cpp-end) (save-excursion (when ... ... ...))
(prog1 (c-with-<->-as-parens-suppressed ...) (setq c-state-old-cpp-beg
here-cpp-beg c-state-old-cpp-end here-cpp-end)))
c-parse-state()
(or c-state-cache (c-parse-state))
(c-safe-position (point) (or c-state-cache (c-parse-state)))
(or (c-safe-position (point) (or c-state-cache ...)) 0)
(max (or (c-safe-position ... ...) 0) (point-min))
(setq safe-pos (max (or ... 0) (point-min)) safe-pos-list (list safe-pos))
(if (setq safe-pos (car-safe safe-pos-list)) nil (setq safe-pos (max
... ...) safe-pos-list (list safe-pos)))
(unless (setq safe-pos (car-safe safe-pos-list)) (setq safe-pos (max
... ...) safe-pos-list (list safe-pos)))
(let ((pos ...) safe-pos state pps-end-pos) (while (and safe-pos-list
...) (setq safe-pos-list ...)) (unless (setq safe-pos ...) (setq
safe-pos ... safe-pos-list ...)) (while (progn ... ...) (setq safe-pos
... safe-pos-list ...)) (if (elt state 1) (setq safe-pos ...
safe-pos-list ...)) (if (or ... ...) (elt state 8)))
(save-excursion (let (... safe-pos state pps-end-pos) (while ... ...)
(unless ... ...) (while ... ...) (if ... ...) (if ... ...)))
c-ssb-lit-begin()
(setq lit-beg (c-ssb-lit-begin))
(cond ((setq lit-beg ...) (goto-char lit-beg) t) ((and paren-level
...) (if ... ... ... nil)) ((c-beginning-of-macro limit) (if ... t ...
nil)))
(let ((pos ...) state-2 pps-end-pos) (cond (... ... t) (... ...) (...
...)))
(and (< (skip-chars-backward skip-chars limit) 0) (let (... state-2
pps-end-pos) (cond ... ... ...)))
(while (and (< ... 0) (let ... ...)))
(progn (while (and ... ...)) (> (point) (progn ... ...)))
(while (progn (while ...) (> ... ...)))
(let ((start ...) state-2 safe-pos-list start-macro-beg lit-beg
(paren-level-pos ...)) (while (progn ... ...)) (/= (point) start))
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 (x86_64-apple-darwin10.2.0, NS apple-appkit-1038.25)
of 2010-01-15 on edith.local
Windowing system distributor `Apple', version 10.3.1038
configured using `configure '--with-ns''
Important settings:
value of $LC_ALL: en_US.UTF-8
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
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-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 <backspace> <M-backspace> <M-backspace> <M-backspace>
<M-backspace> <M-backspace> l i s <tab> <tab> <tab>
c c <tab> <backspace> <backspace> p r o <tab> g m <tab>
c c <tab> <tab> <tab> e n g <tab> <return> <escape>
x e v a l - b f <tab> <backspace> u <tab> <return>
M-x C-g C-x C-f C-a C-k / t m p / f o o . c p p <return>
# i n c l u d e SPC < f o o > <escape> x t o g g l
e d - <backspace> <backspace> - e <backspace> d e <tab>
<return> e r <tab> <return> C-a C-x k y <backspace>
<return> y e s <return> C-x C-f <up> <return> # i n
c l u d e SPC < f o o > <down-mouse-1> <mouse-1> <wheel-up>
<double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<help-echo> <down-mouse-1> <mouse-1> C-x h M-w <help-echo>
<down-mouse-1> <mouse-1> q q <escape> x r e p o r t
- - e m <tab> <return>
Recent messages:
Quit
let: Args out of range: 15, 16
Making completion list...
Debug on Error enabled globally
Entering debugger...
Mark set [2 times]
Saved text until "interactively(c-electric-lt-gt nil nil)
"
Entering debugger...
Back to top level.
Load-path shadows:
None found.
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
hashcash mail-utils emacsbug debug cus-start cus-load cc-mode cc-fonts
cc-menus cc-cmds cc-styles cc-align cc-engine cc-langs cl cl-19 cc-vars
cc-defs regexp-opt cc-bytecomp vc-dispatcher vc-bzr sha1 hex-util
help-mode view tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win
easymenu 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 ns multi-tty emacs)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
iEYEARECAAYFAktRBaYACgkQ17c2LVA10VsrOwCgwyddVcYGAcOf5HyuiihOotSe
zKkAnjdB/a/dqQKoNaKIxR69d4ZPVYiY
=SRwH
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug#5395: cc-mode raises on typing '>' in #include
[not found] <mailman.1514.1263626903.18930.bug-gnu-emacs@gnu.org>
@ 2010-01-16 18:40 ` deceiver
0 siblings, 0 replies; 5+ messages in thread
From: deceiver @ 2010-01-16 18:40 UTC (permalink / raw)
To: bug-gnu-emacs
On 16 Jan, 01:17, Daniel Colascione <dan...@censorshipresearch.org>
wrote:
> After typing the closing '>', an error is raised. Here is the traceback
I am also seeing this issue using the latest build of Emacs from the
debian emacs snapshots repository:
GNU Emacs 23.1.91.1
Built 20100111
Happens regardless if I start with -Q or not.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#5395: cc-mode raises on typing '>' in #include
2010-01-16 0:17 bug#5395: cc-mode raises on typing '>' in #include Daniel Colascione
@ 2010-01-18 17:00 ` Chong Yidong
2010-01-18 20:03 ` Alan Mackenzie
2010-01-20 10:34 ` Alan Mackenzie
1 sibling, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2010-01-18 17:00 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: 5395, Daniel Colascione
> Check out latest Emacs BZR.
> Start with -Q
> Visit an [empty] .cpp file
> Type #include <foo>
>
> After typing the closing '>', an error is raised. Here is the traceback
Actually, I get an error as soon as I type #.
Alan, I think this is due to your 2009-12-03 changes to the
c-parse-state mechanism. Could you take a look?
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#5395: cc-mode raises on typing '>' in #include
2010-01-18 17:00 ` Chong Yidong
@ 2010-01-18 20:03 ` Alan Mackenzie
0 siblings, 0 replies; 5+ messages in thread
From: Alan Mackenzie @ 2010-01-18 20:03 UTC (permalink / raw)
To: Chong Yidong; +Cc: 5395, Daniel Colascione
Hello, Yidong and Daniel,
On Mon, Jan 18, 2010 at 12:00:17PM -0500, Chong Yidong wrote:
> > Check out latest Emacs BZR.
> > Start with -Q
> > Visit an [empty] .cpp file
> > Type #include <foo>
> > After typing the closing '>', an error is raised. Here is the traceback
> Actually, I get an error as soon as I type #.
> Alan, I think this is due to your 2009-12-03 changes to the
> c-parse-state mechanism. Could you take a look?
I feel the error is caused by the bug in
Subject: (insert ?\n) spuriously calls before-change-functions twice.
which I reported on 2010-01-05 and have since fixed. I haven't yet been
able to commit the fix due to not yet understanding bzr well enough.
Soon!
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#5395: cc-mode raises on typing '>' in #include
2010-01-16 0:17 bug#5395: cc-mode raises on typing '>' in #include Daniel Colascione
2010-01-18 17:00 ` Chong Yidong
@ 2010-01-20 10:34 ` Alan Mackenzie
1 sibling, 0 replies; 5+ messages in thread
From: Alan Mackenzie @ 2010-01-20 10:34 UTC (permalink / raw)
To: Daniel Colascione, 5395
Hello, Daniel,
On Fri, Jan 15, 2010 at 07:17:42PM -0500, Daniel Colascione wrote:
> Check out latest Emacs BZR.
> Start with -Q
> Visit an arbitrary .cpp file
> Type #include <foo>
> After typing the closing '>', an error is raised. Here is the traceback
[ .... ]
Thanks for the traceback. It was useful.
I'm not sure how you managed to type beyond the '#' without getting this
error. ;-(
Anyhow, I've committed a fix for this (or a very similar) bug into
savannah. Could you please update your bzr Emacs and see if the bug has
gone.
Thanks!
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-01-20 10:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-16 0:17 bug#5395: cc-mode raises on typing '>' in #include Daniel Colascione
2010-01-18 17:00 ` Chong Yidong
2010-01-18 20:03 ` Alan Mackenzie
2010-01-20 10:34 ` Alan Mackenzie
[not found] <mailman.1514.1263626903.18930.bug-gnu-emacs@gnu.org>
2010-01-16 18:40 ` deceiver
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).