[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: intern-soft, find-face/get-face, and facep for determining faces' de

From: Stephen J. Turnbull
Subject: Re: intern-soft, find-face/get-face, and facep for determining faces' definedness
Date: Tue, 02 Nov 2004 15:14:08 +0900
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chayote, linux)

>>>>> "Brian" == Brian Palmer <address@hidden> writes:

    Brian> In vc.el, vc-annotate-lines, the following binding is established:
    Brian> (face (or (intern-soft face-name)
    Brian> A fix would be in emacs to use (facep face-name) and [...] xemacs to 
use (find-face
    Brian> face-name), instead.

This looks correct.

    Brian> Xemacs developers, is there any reason that xemacs's facep
    Brian> should not be extended to take either face objects or names
    Brian> (so, for example, (facep 'bold) => t )?

Yes, there is.  That's what `find-face' is for.  We'd still probably
want a way to distinguish between face names and face objects, and
proving that (a) we don't currently have any code that depends on
`facep''s behavior, and (b) that we'd never want it, is more work than
this is worth.

    Brian> Or could find-face/get-face be implemented for emacs? (They
    Brian> seem like probably useful functions to me).

Your version wasn't quite right; it's

(defalias 'find-face 'facep)

(defun get-face (face-or-name)
  (or (find-face face-or-name)
      (error "Face %s doesn't exist" face-or-name)))

Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]