Mercurial > hg > xemacs-beta
diff src/mule-charset.c @ 3711:761385dfa575
[xemacs-hg @ 2006-11-29 19:56:09 by aidan]
Provide a FORCE argument in set-charset-registries, document that the user
should be using XLFD font forms and that the Mule build refuses to accept
non-XLFD forms unless forced.
author | aidan |
---|---|
date | Wed, 29 Nov 2006 19:56:15 +0000 |
parents | 3131094eed8c |
children | bd7108edc555 |
line wrap: on
line diff
--- a/src/mule-charset.c Wed Nov 29 19:10:03 2006 +0000 +++ b/src/mule-charset.c Wed Nov 29 19:56:15 2006 +0000 @@ -891,7 +891,7 @@ face_property_was_changed (Vdefault_face, Qfont, Qglobal); } -DEFUN ("set-charset-registries", Fset_charset_registries, 2, 2, 0, /* +DEFUN ("set-charset-registries", Fset_charset_registries, 2, 3, 0, /* Set the `registries' property of CHARSET to REGISTRIES. REGISTRIES is an ordered vector of strings that describe the X11 @@ -906,8 +906,22 @@ (set-charset-registries 'ascii ["jisx0201.1976-0"]) +If optional argument FORCE is non-nil, avoid sanity-checking the elements of +REGISTRIES. Normally the strings are checked to make sure they contain no +XLFD wild cards and that they contain at least one hyphen; the only context +in which one might want not to do this is in order to use a font which +doesn't have a full XLFD--and thus, an effective +CHARSET_REGISTRY-CHARSET_ENCODING of ""--to display ASCII. + +We recommend strongly that you specify a full XLFD, since this makes +multilingual and variant font handling work much better. To get the full +XLFD of any font, start xfd with the short name as the pattern argument: + + xfd -fn 8x16kana + +and use the text that appears at the top of the window. */ - (charset, registries)) + (charset, registries, force)) { int i; charset = Fget_charset (charset); @@ -916,6 +930,12 @@ for (i = 0; i < XVECTOR_LENGTH(registries); ++i) { CHECK_STRING (XVECTOR_DATA(registries)[i]); + + if (!NILP(force)) + { + continue; + } + if (NULL == qxestrchr(XSTRING_DATA(XVECTOR_DATA(registries)[i]), '-')) { invalid_argument("Not an X11 REGISTRY-ENCODING combination",