emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: TAB (c-indent-command) signals a peculiar error]


From: Stefan Monnier
Subject: Re: address@hidden: TAB (c-indent-command) signals a peculiar error]
Date: 19 Aug 2004 15:04:09 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> This is a bug in the syntax functions in the Emacs core. I've further
> minimized the test case to this:

> 1.  Start Emacs with -q -no-site-file.
> 2.  Create a new buffer in C mode.
> 3.  Enter: À RET (
> 4.  Narrow the buffer to show only the open paren.
> 5.  Evaluate: (forward-comment -1)

Thanks I can reproduce it.

> Furthermore, I've no idea what the error means and how the caller is
> supposed to handle it.  Perhaps it should be an internal assertion
> instead.

Yes, it's a sign of a bug in the C code.  But it turned out that having it
as an elisp exception was quite handy for debugging purposes since I could
trigger it over and over again without having to restart Emacs.

I've just installed the patch below.
I'm not sure it fixes your bug, but it looks like it fixes a bug and it
seems to fix the test case you provide,


        Stefan


--- syntax.c    26 jui 2004 15:35:52 -0400      1.175
+++ syntax.c    19 aoû 2004 14:54:44 -0400      
@@ -292,7 +292,7 @@
 
   DEC_BOTH (charpos, bytepos);
 
-  while (bytepos >= beg)
+  while (charpos >= beg)
     {
       int c;
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]