[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 20:07:03 +0900
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chayote, linux)

>>>>> "Miles" == Miles Bader <address@hidden> writes:

    Miles> Brian Palmer <address@hidden> writes:

    >> If find-face in emacs didn't return a face object, it wouldn't
    >> be doing a very good job of compatibility, now.

    Miles> What's a "face object" in Emacs?

A symbol, I should think.  I was confused by the fact that `facep'
returns a vector of length 17 whose first element is the symbol 'face.
However, I would guess that that's a useless artifact of the
implementation, since (facep (facep 'bold)) is nil.

    Miles> [Indeed, what's a "face object" in Xemacs?]

A C structure wrapped in Lisp housekeeping information that implements
a face.  I'm not sure why they were exposed to Lisp in the first
place; I suspect to avoid repeated lookups in code that compares faces
to determine if they contrast and the like.  Probably a premature

    Miles> How are they different than a face name (other than what
    Miles> `facep' returns in Xemacs)?

A face name is a symbol.  A face object is a data structure.

    Miles> Given that Xemacs has a differing definition of facep
    Miles> requiring one to use `find-face' instead, would an Emacs
    Miles> version:

    Miles>    (defun find-face (face) (and (facep face) face))

    Miles> do the job?


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]