emacs-devel
[Top][All Lists]
Advanced

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

Re: Wrong fontification in C source


From: Tino Calancha
Subject: Re: Wrong fontification in C source
Date: Tue, 13 Sep 2016 04:48:24 +0900 (JST)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)



On Mon, 12 Sep 2016, Alan Mackenzie wrote:

Hello, Tino.

On Wed, Aug 31, 2016 at 12:31:00AM +0900, Tino Calancha wrote:

Hi Alan,

I've just noticed that after commit:
578d9aaf82b386c1a0316dde491d297e18e10636
in Emacs C source code,
'DEFUN' gets face 'default' instead of 'font-lock-function-name-face'.

OK.  This is not necessarily a bug; "DEFUN" is not the name of the
function being defined, therefore it is not obvious why it should get
font-lock-function-name-face.  If anything should get that face, it is
the identifier beginning with "F...".
That's right.

If, with SW older than 578d9a..., you type instead "DFUN", or any other
string, this also gets fontified with font-lock-function-name-face
(possibly at first needing M-o M-o).  So it is not "DEFUN" as such which
is being fontified, it is rather the identifier in that position.

So, the sensible thing to do is either (i) enhance the fontification
part of CC Mode to handle DEFUN (and DEFVAR, ....) properly; or (ii)
decide that the situation is "not a bug".  Given how much work it would
take to parse DEFUN and friends, and the fact that they're not used
outside of Emacs development, I'm inclined to go for alternative (ii).
I agree.  I just got used to see DEFUN with a nice blue color, but your
argument convinced me.

Regards,
Tino



reply via email to

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