diff 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
line wrap: on
line diff
--- a/lisp/faces.el	Sat Apr 30 12:57:04 2011 +0900
+++ b/lisp/faces.el	Sat Apr 30 13:04:47 2011 +0900
@@ -238,16 +238,19 @@
 					&optional domain default
 					no-fallback)
   "Return the instance of FACE's PROPERTY matching MATCHSPEC in DOMAIN.
-Currently the only useful value for MATCHSPEC is a charset, when used
-in conjunction with the face's font; this allows you to retrieve a
-font that can be used to display a particular charset, rather than just
-any font.
+Currently MATCHSPEC is used only for the 'font property, when its value
+should be a cons \(CHARSET . STAGE) \(see `specifier-matching-instance'
+for a full description of the matching process).  This allows you to
+retrieve a font that can be used to display a particular charset, rather
+than just any font.  For backward compatibility, MATCHSPEC may be a
+charset, which is interpreted as \(CHARSET . final).
 
-Other than MATCHSPEC, this function is identical to `face-property-instance'.
-See also `specifier-matching-instance' for a fuller description of the
-matching process."
+See `face-property-instance' for usage of the other arguments."
 
   (setq face (get-face face))
+  ;; For compatibility with 21.4-oriented code, eg, x-symbol-mule.el.
+  (when (charsetp matchspec)
+    (setq matchspec (cons matchspec 'final)))
   (let ((value (get face property)))
     (when (specifierp value)
       (setq value (specifier-matching-instance value matchspec domain