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

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

problem with font-lock in C-mode with keywords inside "//" comments


From: Matt Kowitt
Subject: problem with font-lock in C-mode with keywords inside "//" comments
Date: Fri, 9 Nov 2001 13:49:00 -0800

--text follows this line--
This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.1.1 (i386-msvc-nt5.0.2195)
 of 2001-10-22 on buffy
configured using `configure --with-msvc (12.00)'
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: ENU
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

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

Keywords appearing with "//"-style comments are being highlighed.
Place the following C-snippet inside a c-mode buffer, and then
font-lock-fontify-buffer it; when I do this, the words "for" and "do"
are (erroneously) highlighted.  In contrast, in the "/* */"-style
comment, keywords are left undistinguished.

void main(void) {
  // keywords appearing within "//" style comments, 
  // like: for do, appear (erroneously) highlighted.

  /* keywords appearing within "/*" style comments,
   * like:  while if, are not highlighted.
   */
}



Recent input:
a p p e a r SPC h i g h l i g h t e d . <help-echo> 
<down-mouse-1> <mouse-1> <help-echo> <menu-bar> <edit> 
<paste> <help-echo> SPC <down-mouse-1> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <drag-mouse-1> <delete> 
a r e SPC n o t <down> * / <return> } { <backspace> 
C-S-l <down-mouse-1> <mouse-movement> <mouse-1> <menu-bar> 
<help-menu> <report-emacs-bug>

Recent messages:
Unhighlighting
Done unhighlighting
highlighting 8: /\* ... \*/
highlighting 7: hilit-string-find
highlighting 6: ^#[     ]*\(undef\|define\).*$ ... [^\]$
highlighting 5: ^#.*$
highlighting 4: ^\(\w\|[$_]\)+\s *\(\(\w\|[$_]\)+\s *((\|(\)[^)]*)+
highlighting 3: ^\(typedef\|struct\|union\|enum\).*$
highlighting 1: 
[^_]\<\(return\|goto\|if\|else\|case\|default\|switch\|break\|continue\|while\|do\|for\)\>[^_]


______________________________________________________________________
                                    |
  Matthew S. Kowitt                 |   E-mail: address@hidden
  Stanford Research Systems         |   FAX: +1-408-744-9077
  1290 D Reamwood Avenue            |   
  Sunnyvale, CA 94089  USA          |   WWW: http://www.thinkSRS.com
____________________________________|_________________________________



reply via email to

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