[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: jit-font-lock endless loop
From: |
Stefan Monnier |
Subject: |
Re: jit-font-lock endless loop |
Date: |
Mon, 24 Feb 2003 20:38:22 -0500 |
> Symptoms:
>
> This simple lisp code locks Emacs somewhere in the font-lock code:
>
> ;
> #+bar (defun foo ()
> "")
>
> To reproduce the problem is enough to save the 29 bytes long source
> in, say, foo.lisp and then run:
>
> emacs -q foo.lisp
>
> Once loaded M-x font-lock-mode should make Emacs enter an infinite
> loop.
Thank you for the bug report. It turns out it was a bug in the back_comment
code that skipped over the whole
;
#+bar (defun foo ()
as if it were a single comment.
I've committed the fix below which fixes the problem for me.
Stefan
--- syntax.c.~1.162.~ Wed Feb 5 10:28:00 2003
+++ syntax.c Mon Feb 24 20:33:14 2003
@@ -609,7 +609,7 @@
case Sendcomment:
if (SYNTAX_FLAGS_COMMENT_STYLE (syntax) == comstyle
- && (SYNTAX_FLAGS_COMMENT_NESTED (prev_syntax)
+ && ((com2end && SYNTAX_FLAGS_COMMENT_NESTED (prev_syntax))
|| SYNTAX_FLAGS_COMMENT_NESTED (syntax)) == comnested)
/* This is the same style of comment ender as ours. */
{