[Top][All Lists]

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

font-lock error

From: Geert Kloosterman
Subject: font-lock error
Date: Thu, 19 Apr 2001 20:41:36 +0200

In GNU Emacs 20.7.1 (i386-redhat-linux-gnu, X toolkit)
 of Tue Jun 13 2000 on porky.devel.redhat.com
configured using `configure  --mandir=/usr/man --infodir=/usr/info 
--prefix=/usr --libexecdir=/usr/lib --sharedstatedir=/var --with-gcc --with-pop 
--with-x-toolkit i386-redhat-linux-gnu'

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

When using font-lock in c-mode (in c++-mode it works ok) 
and having code like this:

    goto_label:    /* this is a comment */

the label is incorrectly NOT recognised.

I've located the problem in the code:
The regex in the definition of `c-font-lock-keywords-2' on line 2317 
(at least in the version that comes with v20.7) of font-lock.el
incorrectly reads:

    "^[ \t]*\\(\\sw+\\)[ \t]*:[ \t]*$"             

The `$' anchor at the end should be removed.  The following regex
should be sufficient:

    "^[ \t]*\\(\\sw+\\)[ \t]*:"

Friendly regards,

Geert Kloosterman

reply via email to

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