[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 21:06:56 +0900 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chayote, linux) |
>>>>> "Miles" == Miles Bader <address@hidden> writes:
Miles> To be reasonably compatible with Xemacs, it would be
Miles> necessary to know what exactly a face-object (such as
Miles> returned by `find-face') is useful for, and I don't.
As an optimization. You can avoid a table lookup if you have the
object. We also have truly anonymous temporary faces, which get
garbage collected simply by dropping them on the floor, as they never
get entered into any tables. Another optimization; I guess you could
use gensyms and key-weak hash tables to get the same effect nowadays.
Offhand I'd guess the other APIs (ie, except for `facep) all accept
either a face name or a face object.
The only tricky thing about find-face is that it needs to be
idempotent:
(Assert (null (find-face (find-face [nope])))) ; not a symbol
(Assert (null (find-face (find-face nil)))) ; a special non-face symbol
(Assert (null (find-face (find-face (gensym))))) ; a non-face symbol
(Assert (eq (find-face 'default) (find-face (find-face 'default))))
I think that gives full coverage. Your definition of find-face should
be fine, except possibly for XEmacs APIs Emacs doesn't have.
--
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.
- intern-soft, find-face/get-face, and facep for determining faces' definedness, Brian Palmer, 2004/11/01
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Stephen J. Turnbull, 2004/11/02
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Brian Palmer, 2004/11/02
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Miles Bader, 2004/11/02
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Brian Palmer, 2004/11/02
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Miles Bader, 2004/11/02
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Brian Palmer, 2004/11/02
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Miles Bader, 2004/11/02
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness,
Stephen J. Turnbull <=
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Miles Bader, 2004/11/02
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Oliver Scholz, 2004/11/06
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Stephen J. Turnbull, 2004/11/02
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Stefan, 2004/11/02
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Miles Bader, 2004/11/02
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Richard Stallman, 2004/11/03
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Stefan Monnier, 2004/11/03
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Zajcev Evgeny, 2004/11/03
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Andreas Schwab, 2004/11/03
- Re: intern-soft, find-face/get-face, and facep for determining faces' definedness, Zajcev Evgeny, 2004/11/03