Mercurial > hg > xemacs-beta
comparison lisp/faces.el @ 5484:d12a0c55b174
[mq]: matchspec
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Sat, 30 Apr 2011 13:04:47 +0900 |
parents | 4dee0387b9de |
children | 3bc58dc9d688 |
comparison
equal
deleted
inserted
replaced
5483:156c1a62a82d | 5484:d12a0c55b174 |
---|---|
236 | 236 |
237 (defun face-property-matching-instance (face property matchspec | 237 (defun face-property-matching-instance (face property matchspec |
238 &optional domain default | 238 &optional domain default |
239 no-fallback) | 239 no-fallback) |
240 "Return the instance of FACE's PROPERTY matching MATCHSPEC in DOMAIN. | 240 "Return the instance of FACE's PROPERTY matching MATCHSPEC in DOMAIN. |
241 Currently the only useful value for MATCHSPEC is a charset, when used | 241 Currently MATCHSPEC is used only for the 'font property, when its value |
242 in conjunction with the face's font; this allows you to retrieve a | 242 should be a cons \(CHARSET . STAGE) \(see `specifier-matching-instance' |
243 font that can be used to display a particular charset, rather than just | 243 for a full description of the matching process). This allows you to |
244 any font. | 244 retrieve a font that can be used to display a particular charset, rather |
245 | 245 than just any font. For backward compatibility, MATCHSPEC may be a |
246 Other than MATCHSPEC, this function is identical to `face-property-instance'. | 246 charset, which is interpreted as \(CHARSET . final). |
247 See also `specifier-matching-instance' for a fuller description of the | 247 |
248 matching process." | 248 See `face-property-instance' for usage of the other arguments." |
249 | 249 |
250 (setq face (get-face face)) | 250 (setq face (get-face face)) |
251 ;; For compatibility with 21.4-oriented code, eg, x-symbol-mule.el. | |
252 (when (charsetp matchspec) | |
253 (setq matchspec (cons matchspec 'final))) | |
251 (let ((value (get face property))) | 254 (let ((value (get face property))) |
252 (when (specifierp value) | 255 (when (specifierp value) |
253 (setq value (specifier-matching-instance value matchspec domain | 256 (setq value (specifier-matching-instance value matchspec domain |
254 default no-fallback))) | 257 default no-fallback))) |
255 value)) | 258 value)) |