Ar an triochadú lá de mí Iúil, scríobh Mike FABIAN:
"Stephen J. Turnbull" <stephen(a)xemacs.org> さんは書きました:
> Mike FABIAN writes:
> > > (If you’re planning on distributing code with that Windows-1252
> > > coding system, by the way, you will also want the change in
> > > http://mid.gmane.org/18091.3408.152729.823883＠parhasard.net
> > > --- startup.el 2007/05/25 15:47:56 1.58
> > > +++ startup.el 2007/07/28 09:08:23
> > > ＠＠ -713,6 +713,9 ＠＠
> > > (when (featurep 'mule)
> > > (declare-fboundp (init-mule-at-startup)))
> > >
> > > + (set-language-unicode-precedence-list
> > Is there any disadvantage of doing that?
> Hard to say; Ben admitted the design is questionable. The docstring
> says "interface is subject to change."
> The intent of the design was that this function would be used by
> language environments; putting this into startup.el is clearly a
> violation of the design. *If* there are any language environments that
> use s-l-u-p-l, then when entered they will wipe out this change
> entirely if I recall the implementation correctly.
None of the language environments in XEmacs CVS currently use
set-language-unicode-precedence-list; if they had done, Stephen is correct
that such a call in startup.el would override them.
Code in site-start.el is called after that, though, as you worked out.
I think it would be nicer if set-language-unicode-precedence-list
be called at *any* time and really wipe out all changes of previous
calls, i.e. also have an effect on the typed input in X-frames.
Huh. Well, an issue with this is that some of the X11 keysyms are defined to
map explicitly to non-Unicode character sets, and some are defined to map to
Unicode. Would it be appropriate for Zcaron to map to ISO 8859-15 in Western
Europe, despite that the standards say it should be assigned to ISO 8859-2?
The answer though is that people don’t care, as long as their files are
written to disk correctly.
[...] Then, a user could use this function in ~/.xemacs/init.el to
enforce his own preferences. Right now this works only partly because
some changes can not be done after the initialisation of the window
Well, that’s not quite true, though yes, it does also require also a good
bit of XEmacs knowledge to be able to say that. This code tells every
non-ASCII character to generate the XEmacs character it would map to when
converted to Unicode, and then converted back using the latest values for
for keysym in (hash-table-key-list (x-keysym-hash-table))
with current-binding = nil
do (when (and
(setq current-binding (get-character-of-keysym keysym)))
But for most people that code should not be necessary if the locale was
correctly determined at startup (before the window-system code) and if each
language environment set the language-unicode-precedence-mapping. Is the
language environment incorrectly set by default for you without your
site-start.el? I’ve added code that handles that much better in the last
year, so examining LANG may no longer be necessary.
Stephen’s comment in Unicode.c (below) is incorrect when it comes to
Cyrillic in that we’ve only ever supported cyrillic-iso8859-5 as an internal
character set for most of Cyrillic, mapping to it on decoding and from it on
encoding, so koi8-r and windows-1251 would never have been in the list; it’s
also incorrect in that Chinese-Big5 and Chinese-CNS have been separate
language environments in Mule whenever Chinese-CNS was supported in the
context of language environments, which it mostly hasn’t been. So to me it
does make sense to add support for calling this function to the language
/* #### This interface is wrong. Cyrillic users and Chinese users are going
to have varying opinions about whether ISO Cyrillic, KOI8-R, or Windows
1251 should take precedence, and whether Big Five or CNS should take
precedence, respectively. This means that users are sometimes going to
want to set Vlanguage_unicode_precedence_list.
Furthermore, this should be language-local (buffer-local would be a
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
XEmacs-Beta mailing list