* Wrong fontification in C source @ 2016-08-30 15:31 Tino Calancha 2016-09-12 19:23 ` Alan Mackenzie 0 siblings, 1 reply; 3+ messages in thread From: Tino Calancha @ 2016-08-30 15:31 UTC (permalink / raw) To: Alan Mackenzie; +Cc: Emacs developers 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'. Regards, Tino ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Wrong fontification in C source 2016-08-30 15:31 Wrong fontification in C source Tino Calancha @ 2016-09-12 19:23 ` Alan Mackenzie 2016-09-12 19:48 ` Tino Calancha 0 siblings, 1 reply; 3+ messages in thread From: Alan Mackenzie @ 2016-09-12 19:23 UTC (permalink / raw) To: Tino Calancha; +Cc: Emacs developers 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). ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Wrong fontification in C source 2016-09-12 19:23 ` Alan Mackenzie @ 2016-09-12 19:48 ` Tino Calancha 0 siblings, 0 replies; 3+ messages in thread From: Tino Calancha @ 2016-09-12 19:48 UTC (permalink / raw) To: Alan Mackenzie; +Cc: Emacs developers, Tino Calancha 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-12 19:48 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-08-30 15:31 Wrong fontification in C source Tino Calancha 2016-09-12 19:23 ` Alan Mackenzie 2016-09-12 19:48 ` Tino Calancha
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).