>>>> "MB" == Martin Buchholz
<martin(a)xemacs.org> writes:
MB> Oh, Alexey, can't you do everything you need for koi8 without
MB> hacking the C code, by doing simply:
MB> ;;; koi8.el: (when (not (featurep 'mule)) (keyboard-translate
MB> 'Cyrillic_hardsign 'ydiaeresis) ... )
I want to switch by whole arrays.
First reason: there is already code `x_keysym_to_character' that works
but just needs a clean well-defined hack to solve single simple
problem (Stephen, I consider your concerns about overcyrillization).
Second reason, more practical about why I want to deal with arrays:
suppose we're setting cp1251 encoding for Cyrillic characters. We
have
(defun set-cyrillic-cp1251-encoding
(set-keysym-translation 'Cyrillic_HARDSIGN ?\xDA)
(set-keysym-translation 'Cyrillic_DZHE ?\0x8F))
After that we want to switch to koi8-r. We have:
(defun set-cyrillic-koi8-r-encoding
(set-keysym-translation 'Cyrillic_HARDSIGN ?\xFF)
;; because koi8-r does not have DZHE
(set-keysym-translation 'Cyrillic_DZHE nil))
That is, we have to explicitly unset every keysym that could be
supported by some other encoding and could not be supported by the
encoding we're trying to set. This is very tedious IMHO and is better
handled by
char *cyrillic = cyrillic_koi8_r;
MB> My apologies if this was already considered and rejected.
--alexm