From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Emacs 23.3 stops font-lock when have long face name Date: Mon, 30 Nov 2015 18:07:58 +0200 Message-ID: <83io4jmpwh.fsf@gnu.org> References: <7qr3jetg5q.fsf@emma.svaha.wsnyder.org> <2656428d1586829c3a3613575704dd1e.squirrel@mail.wsnyder.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1448899714 16707 80.91.229.3 (30 Nov 2015 16:08:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2015 16:08:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Wilson Snyder Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 30 17:08:24 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a3R04-00045B-Bb for ged-emacs-devel@m.gmane.org; Mon, 30 Nov 2015 17:08:24 +0100 Original-Received: from localhost ([::1]:41741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3R03-000258-LW for ged-emacs-devel@m.gmane.org; Mon, 30 Nov 2015 11:08:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3Qzp-00024y-PS for emacs-devel@gnu.org; Mon, 30 Nov 2015 11:08:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3Qzm-0001hJ-HI for emacs-devel@gnu.org; Mon, 30 Nov 2015 11:08:09 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:41195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3Qzm-0001gq-97 for emacs-devel@gnu.org; Mon, 30 Nov 2015 11:08:06 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NYM00600XRQBR00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Mon, 30 Nov 2015 18:08:03 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYM0064OY5F59B0@a-mtaout23.012.net.il>; Mon, 30 Nov 2015 18:08:03 +0200 (IST) In-reply-to: <2656428d1586829c3a3613575704dd1e.squirrel@mail.wsnyder.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195617 Archived-At: > Date: Thu, 26 Nov 2015 09:13:18 -0500 > From: "Wilson Snyder" > > > Can anyone please suggest what version this was fixed and > > suggest a workaround for the older Emacsen? > > > > I would prefer not to rename the long face's name (really > > it's verilog-font-grouping-keywords-face) since that name > > has been stable for several versions of Emacs and may be in > > user's customizations. > > A very small tarball showing this issue is at > http://www.veripool.org/attachments/download/703/test.tgz > > To run this, using Emacs 24.3 (and 23.3 and probably others but not 25.0), > extract and type ./test.sh > > You'll see the first four "new" keywords are highlighted. Later ones are > incorrectly not highlighted. > > If you then edit test.el to change > v-font-long-name-here-here-here-here-face to v-font-short-face, which has > an identical definition, you'll see the fontification works correctly. Thanks for the reproducible test case, and sorry for the long delay. The problem with this face name has nothing to do with its length. It has to do with the fact that the face and the corresponding variable have similar but different names: (defvar v-font-very-long-name-here-here-here-here-face 'v-font-long-name-here-here-here-here-face "x") (defface v-font-long-name-here-here-here-here-face See the difference? The face name begins with "v-font-very", but the variable name (name, not value) lacks the "very" part. This is what causes the problem: you will see error messages from redisplay in the *Messages* buffer complaining about a void variable. Rename the variable thusly: (defvar v-font-long-name-here-here-here-here-face 'v-font-long-name-here-here-here-here-face "x") and the problem will disappear in Emacs 24. So there's your workaround. HTH