From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Brian Palmer Newsgroups: gmane.emacs.devel,gmane.emacs.xemacs.beta Subject: intern-soft, find-face/get-face, and facep for determining faces' definedness Date: Mon, 01 Nov 2004 13:40:35 -0800 Message-ID: <0whwtx5meng.fsf@rescomp.Stanford.EDU.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1099345309 27996 80.91.229.6 (1 Nov 2004 21:41:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 Nov 2004 21:41:49 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 01 22:41:38 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1COjvm-0003fL-00 for ; Mon, 01 Nov 2004 22:41:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1COk3m-0002Xz-T1 for ged-emacs-devel@m.gmane.org; Mon, 01 Nov 2004 16:49:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1COk31-0002EE-QQ for emacs-devel@gnu.org; Mon, 01 Nov 2004 16:49:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1COk30-0002Ds-65 for emacs-devel@gnu.org; Mon, 01 Nov 2004 16:49:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1COk30-0002DX-0S for emacs-devel@gnu.org; Mon, 01 Nov 2004 16:49:06 -0500 Original-Received: from [171.67.16.123] (helo=smtp1.Stanford.EDU) by monty-python.gnu.org with esmtp (Exim 4.34) id 1COjup-00060S-A2 for emacs-devel@gnu.org; Mon, 01 Nov 2004 16:40:39 -0500 Original-Received: from rescomp.Stanford.EDU (rescomp.Stanford.EDU [171.64.136.254]) by smtp1.Stanford.EDU (8.12.11/8.12.11) with ESMTP id iA1LeaQE026397; Mon, 1 Nov 2004 13:40:37 -0800 Original-To: emacs-devel@gnu.org, xemacs-beta@xemacs.org User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, usg-unix-v) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29280 gmane.emacs.xemacs.beta:16631 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29280 In vc.el, vc-annotate-lines, the following binding is established: (face (or (intern-soft face-name) (let ((tmp-face (make-face (intern face-name)))) (set-face-foreground tmp-face (cdr color)) (if vc-annotate-background (set-face-background tmp-face vc-annotate-background)) tmp-face))); Return the face This is true in both emacs and the recently-synced xemacs vc.el (a similar issue was present in the older xemacs code). This seems frankly wrong to me; it doesn't matter whether the symbol has been interned, it matters whether the face has been defined. A fix would be in emacs to use (facep face-name) and in xemacs to use (find-face face-name), instead. The two different approaches seems troublesome to me; it'd be nice if the same functions could be used in both . Xemacs developers, is there any reason that xemacs's facep should not be extended to take either face objects or names (so, for example, (facep 'bold) => t )? Or could find-face/get-face be implemented for emacs? (They seem like probably useful functions to me). It seems like it'd be as simple as (if (facep FACE) (make-face FACE) (cerror 'nonexistent-face (format "Face %s doesn't exist" FACE))) Or, both. Thoughts appreciated. -- I'm awfully glad I'm a Beta, because I don't work so hard.