# HG changeset patch # User aidan # Date 1164830175 0 # Node ID 761385dfa575246c8ea65c904a68f3616412a003 # Parent 4bcad369dfd4c51000ff6159f66f487cfa1ea8ff [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. diff -r 4bcad369dfd4 -r 761385dfa575 man/ChangeLog --- a/man/ChangeLog Wed Nov 29 19:10:03 2006 +0000 +++ b/man/ChangeLog Wed Nov 29 19:56:15 2006 +0000 @@ -1,3 +1,11 @@ +2006-11-29 Aidan Kehoe + + * xemacs/custom.texi (Face Resources): + Mention that the user should use full XLFD forms for specifying + fonts, and that Mule builds reject the short forms by + default. Also mention the work-around to the latter design choice + that was implemented for Ilya. + 2006-11-16 Stephen J. Turnbull * internals/internals.texi diff -r 4bcad369dfd4 -r 761385dfa575 man/xemacs/custom.texi --- a/man/xemacs/custom.texi Wed Nov 29 19:10:03 2006 +0000 +++ b/man/xemacs/custom.texi Wed Nov 29 19:56:15 2006 +0000 @@ -3035,6 +3035,10 @@ @end example @noindent +All X fonts can be referred to via XLFD-style names, and you should use +those forms. See the man pages for @samp{X(1)}, @samp{xlsfonts(1)}, and +@samp{xfontsel(1)}. + If you use any of the other, less strict font name formats, some of which look like @@ -3045,9 +3049,14 @@ @end example then XEmacs won't be able to guess the names of the bold and italic -versions. All X fonts can be referred to via XLFD-style names, so you -should use those forms. See the man pages for @samp{X(1)}, -@samp{xlsfonts(1)}, and @samp{xfontsel(1)}. +versions, and on a build with internationalization support, it will +refuse to use them. (Since only the XLFD form includes information as +to which character set the font coverage.) + +If it is very important to you to use the short form names, you can +override this for ASCII, and for ASCII alone, by passing the +@samp{FORCE} argument to @samp{set-charset-registries}, and specifying +an empty string as one of the charset registries. @node Widgets @subsection Widgets diff -r 4bcad369dfd4 -r 761385dfa575 src/ChangeLog --- a/src/ChangeLog Wed Nov 29 19:10:03 2006 +0000 +++ b/src/ChangeLog Wed Nov 29 19:56:15 2006 +0000 @@ -1,3 +1,11 @@ +2006-11-29 Aidan Kehoe + + * mule-charset.c (Fset_charset_registries): + Add an optional argument FORCE, to allow specifying badly-formed + CHARSET_REGISTRY-CHARSET_ENCODING combinations. Re-enables the + sort of hacks described in 96wt67fa3f.fsf@mo.msk.ru from Ilya + Golubev. + 2006-11-29 Aidan Kehoe * sound.c (init_native_sound): diff -r 4bcad369dfd4 -r 761385dfa575 src/mule-charset.c --- 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",