intern-soft, find-face/get-face, and facep for determining faces' definedness
monnier at iro.umontreal.ca
Wed Nov 3 10:48:00 EST 2004
> The thing is that XEmacsen `facep' returns non-nil only on face
> objects, not on their names or anything else, however `get-face' does
> all tricks - it returns face object getting face object or face name
> or anything else as input. Here is:
My question was not "how do I do it with XEmacs".
It was "why does XEmacs do it this way".
The `foo-bar-p' runtime-type-check predicates like `commandp',
`functionp', `keymapp', `facep', `markerp', `stringp', `hash-table-p',
`char-table-p' are traditionally linked to the functions that operate on
them such that:
- (functionp foo) is non-nil iff you can pass `foo' to `funcall'.
- (commandp foo) is non-nil iff you can pass `foo' to `command-execute'.
- (keymapp foo) is non-nil iff you can pass it to `lookp-key'.
I'd thus expect that (facep foo) should return non-nil iff foo can be passed
to set-face-<bar> and similar functions.
More information about the XEmacs-Beta