From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Wrong fontification in C source Date: Mon, 12 Sep 2016 19:23:38 +0000 Message-ID: <20160912192338.GB29886@acm.fritz.box> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1473708368 4201 195.159.176.226 (12 Sep 2016 19:26:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Sep 2016 19:26:08 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: Emacs developers To: Tino Calancha Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 12 21:26:04 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjWrf-0000BI-I2 for ged-emacs-devel@m.gmane.org; Mon, 12 Sep 2016 21:25:59 +0200 Original-Received: from localhost ([::1]:44753 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjWrd-0001vj-Hv for ged-emacs-devel@m.gmane.org; Mon, 12 Sep 2016 15:25:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjWpv-0001HF-MH for emacs-devel@gnu.org; Mon, 12 Sep 2016 15:24:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjWpq-00084U-MI for emacs-devel@gnu.org; Mon, 12 Sep 2016 15:24:11 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:47311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjWpq-00083y-DG for emacs-devel@gnu.org; Mon, 12 Sep 2016 15:24:06 -0400 Original-Received: (qmail 99404 invoked by uid 3782); 12 Sep 2016 19:24:04 -0000 Original-Received: from acm.muc.de (p4FC46655.dip0.t-ipconnect.de [79.196.102.85]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 12 Sep 2016 21:24:02 +0200 Original-Received: (qmail 30355 invoked by uid 1000); 12 Sep 2016 19:23:38 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207396 Archived-At: 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).