src/emacs -Q foo.cpp

In the foo.cpp buffer, insert the text:

void foo::bar()  // wrong - foo in font-lock-constant-face (otherwise ok)
{
  foo                   ;// ok - no fontification
 foo:                    // ok - foo in font-lock-constant-face (also used
for labels)
  foo::         ;// ok - foo not fontified (but maybe could be as a type)
    foo::bar     // wrong - foo in font-lock-constant-face

The text "foo" in "foo::bar" is fontified in font-lock-constant-face, rather
than font-lock-type-face.  In C++, at least, anything before a "::" is a
namespace or class name.  Note that mis-fontification happens when the "b"
of "bar" is typed.

Sorry, no fix.  Cc-fonts.el is too scary for my diminishing elisp skills -
and I'm wary of breaking something else anyway.

Simon.

In GNU Emacs 22.0.50.1 (sparc-sun-solaris2.8, X toolkit)
 of 2006-06-19 on perth
X server distributor `Hummingbird Ltd.', version 11.0.100015
configured using `configure '--with-x-toolkit=lucid' 'CFLAGS=-g''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: en_GB.ISO8859-1
  value of $LC_CTYPE: en_GB.ISO8859-1
  value of $LC_MESSAGES: C
  value of $LC_MONETARY: en_GB.ISO8859-1
  value of $LC_NUMERIC: en_GB.ISO8859-1
  value of $LC_TIME: en_GB.ISO8859-1
  value of $LANG: en_GB.ISO8859-1
  locale-coding-system: iso-8859-1
  default-enable-multibyte-characters: t

Major mode: C++/l

Minor modes in effect:
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t
  abbrev-mode: t


_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to