emacs-devel
[Top][All Lists]
Advanced

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

Re: fontification in C++ mode


From: Alexander Klimov
Subject: Re: fontification in C++ mode
Date: Thu, 28 Oct 2010 11:57:53 +0200

Hi.

===

void f(const A& b){}
===

`f' is not treated as a function name. Note that it is not on the
first line of a file and it is the last definition.


===

void a(const A& b){}

void b(const A& b){}

===

Here both function names are not treated.


Btw, I guess it is a good idea to get some c++ sources, dump faces as
produced by emacs-23, normalize and diff with the current version,
e.g., (buffer-substring 1 (point-max)) in emacs-23.1 gives

#("
void b(const A& b){}

" 0 1 (fontified t) 1 4 (fontified t face font-lock-type-face) 4 5
(fontified t c-type c-decl-id-start face font-lock-type-face) 5 6
(fontified t) 6 7 (fontified t face font-lock-function-name-face) 7 8
(fontified t c-type c-decl-arg-start) 8 13 (fontified t face
font-lock-keyword-face) 13 14 (fontified t) 14 15 (fontified t face
font-lock-type-face) 15 17 (fontified t) 17 18 (fontified t face
font-lock-variable-name-face) 18 22 (fontified t) 22 23 (fontified t))

while in the current version it gives

#("
void b(const A& b){}

" 0 1 (fontified t) 1 5 (fontified t face font-lock-type-face) 5 7
(fontified t) 7 8 (fontified t) 8 13 (fontified t face
font-lock-keyword-face) 13 14 (fontified t) 14 15 (fontified t face
font-lock-type-face) 15 17 (fontified t) 17 18 (fontified t face
font-lock-variable-name-face) 18 22 (fontified t) 22 23 (fontified t))

-- 
Regards,
ASK



reply via email to

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