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: Alan Mackenzie
Subject: Re: Wrong fontification in C source
Date: Mon, 12 Sep 2016 19:23:38 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

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...".

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).

> Regards,
> Tino

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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