Mercurial > hg > xemacs-beta
changeset 2766:4b800e9aaadd
[xemacs-hg @ 2005-05-10 17:14:41 by aidan]
Warn about unbound Unicode keysyms.
author | aidan |
---|---|
date | Tue, 10 May 2005 17:14:42 +0000 |
parents | 4ee3cf8de81d |
children | 61af3ea9da02 |
files | lisp/ChangeLog lisp/x-init.el |
diffstat | 2 files changed, 40 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue May 10 17:03:00 2005 +0000 +++ b/lisp/ChangeLog Tue May 10 17:14:42 2005 +0000 @@ -1,3 +1,8 @@ +2005-05-10 Aidan Kehoe <kehoea@parhasard.net> + + * x-init.el (x-initialize-keyboard): Give info about any unbound + Unicode keysyms. + 2005-05-10 Aidan Kehoe <kehoea@parhasard.net> * mule/european.el:
--- a/lisp/x-init.el Tue May 10 17:03:00 2005 +0000 +++ b/lisp/x-init.el Tue May 10 17:14:42 2005 +0000 @@ -230,7 +230,41 @@ (x-win-init-sun)) ((string-match "XFree86" vendor) ;; Those XFree86 people do some weird keysym stuff, too. - (x-win-init-xfree86))))) + (x-win-init-xfree86)))) + ;; Perhaps tell people that some keys won't work. + ;; + ;; If they remap while XEmacs is running and this problem arises, they + ;; won't see the messages. Which should be okay, assuming the length of + ;; time before we get a Unicode-compatible internal encoding is relatively + ;; short. + (let (unknown-code-points sym-string) + (dolist (x-keysym (hash-table-key-list (x-keysym-hash-table))) + (setq sym-string (if (stringp x-keysym) x-keysym (symbol-name x-keysym))) + (when (and (not (get (intern sym-string) 'ascii-character)) + (string-match "^U[0-9A-F]+$" sym-string)) + (pushnew (concat sym-string " ") unknown-code-points :test 'equal))) + (when unknown-code-points + (lwarn 'key-mapping 'info + "Undefined Unicode key mappings. +Your keyboard has, among many others, the following keysyms defined: + +%s +The standards say that applications should interpret these keysyms as +representing the corresponding Unicode code points (e.g. U2720 should +represent MALTESE CROSS), but unfortunately the current version of XEmacs +has no support for many of those characters in its internal encoding, and +when it encounters the keysyms corresponding to those characters, they +remain unbound. + +See the documentation for `unicode-to-char' for one technique if you have an +urgent need for support for one of those characters--you probably don't, +most of the widely-used characters have mappings in the internal XEmacs +encoding--otherwise, wait until we ship a version with an internal encoding +based on Unicode. " + (with-string-as-buffer-contents (apply 'concat " " + unknown-code-points) + (setq fill-prefix " ") + (fill-paragraph nil)))))) ;; Moved from x-toolbar.el, since InfoDock doesn't dump a x-toolbar.el.