From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Idea: Allow faces to have text-like properties Date: 28 Feb 2002 14:15:31 +0100 Message-ID: <5xvgch21e4.fsf@kfs2.cua.dk> References: <5xbse93nti.fsf@kfs2.cua.dk> NNTP-Posting-Host: quimby2.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: quimby2.netfonds.no 1014902404 26649 195.204.10.66 (28 Feb 2002 13:20:04 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 28 Feb 2002 13:20:04 GMT Cc: emacs-devel@gnu.org, tzz@beld.net Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16gQTb-0006vj-00 for ; Thu, 28 Feb 2002 14:20:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16gQPJ-0001UG-00; Thu, 28 Feb 2002 08:15:37 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.33 #1 (Debian)) id 16gQOC-0001M7-00 for ; Thu, 28 Feb 2002 08:14:28 -0500 Original-Received: from kfs2.cua.dk.cua.dk (kfs2.local.filanet.dk [192.168.1.182]) by mail.filanet.dk (Postfix) with SMTP id 0BDD77C04A; Thu, 28 Feb 2002 13:14:26 +0000 (GMT) Original-To: Per Abrahamsen In-Reply-To: Original-Lines: 39 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:1631 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1631 Per Abrahamsen writes: > Couldn't the same effect be achieved if font lock used categories > instead of faces? > You are right. That is the generic (i.e. proper) approach to doing this. Actually, the changes needed to change font-lock to use categories instead of faces seem to be fairly trivial, if we do it like this (illustrated by font-lock-comment-face): (defface font-lock-comment-face ...) ;; as now (defvar font-lock-comment-face 'font-lock-comment-face) ;; as now (put 'font-lock-comment-face 'face font-lock-comment-face) ;; new and then replace all ( .... 'face font-lock-comment-face) with ( .... 'category 'font-lock-comment-face) [this is an oversimplification as the properties are not set in that way ... but I hope you get the idea]. However, the problem with this approach is that setting the font-lock-comment-face variable to another face is not reflected in the `face' property of font-lock-comment-face, so it will not longer have any effect. Any ideas how to overcome that problem? -- Kim F. Storm http://www.cua.dk _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel