comparison lisp/x-init.el @ 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 79c6ff3eef26
children a25c824ed558
comparison
equal deleted inserted replaced
2765:4ee3cf8de81d 2766:4b800e9aaadd
228 (string-equal "X Consortium" vendor)) 228 (string-equal "X Consortium" vendor))
229 ;; Ok, we think this could be a Sun keyboard. Run the Sun code. 229 ;; Ok, we think this could be a Sun keyboard. Run the Sun code.
230 (x-win-init-sun)) 230 (x-win-init-sun))
231 ((string-match "XFree86" vendor) 231 ((string-match "XFree86" vendor)
232 ;; Those XFree86 people do some weird keysym stuff, too. 232 ;; Those XFree86 people do some weird keysym stuff, too.
233 (x-win-init-xfree86))))) 233 (x-win-init-xfree86))))
234 ;; Perhaps tell people that some keys won't work.
235 ;;
236 ;; If they remap while XEmacs is running and this problem arises, they
237 ;; won't see the messages. Which should be okay, assuming the length of
238 ;; time before we get a Unicode-compatible internal encoding is relatively
239 ;; short.
240 (let (unknown-code-points sym-string)
241 (dolist (x-keysym (hash-table-key-list (x-keysym-hash-table)))
242 (setq sym-string (if (stringp x-keysym) x-keysym (symbol-name x-keysym)))
243 (when (and (not (get (intern sym-string) 'ascii-character))
244 (string-match "^U[0-9A-F]+$" sym-string))
245 (pushnew (concat sym-string " ") unknown-code-points :test 'equal)))
246 (when unknown-code-points
247 (lwarn 'key-mapping 'info
248 "Undefined Unicode key mappings.
249 Your keyboard has, among many others, the following keysyms defined:
250
251 %s
252 The standards say that applications should interpret these keysyms as
253 representing the corresponding Unicode code points (e.g. U2720 should
254 represent MALTESE CROSS), but unfortunately the current version of XEmacs
255 has no support for many of those characters in its internal encoding, and
256 when it encounters the keysyms corresponding to those characters, they
257 remain unbound.
258
259 See the documentation for `unicode-to-char' for one technique if you have an
260 urgent need for support for one of those characters--you probably don't,
261 most of the widely-used characters have mappings in the internal XEmacs
262 encoding--otherwise, wait until we ship a version with an internal encoding
263 based on Unicode. "
264 (with-string-as-buffer-contents (apply 'concat " "
265 unknown-code-points)
266 (setq fill-prefix " ")
267 (fill-paragraph nil))))))
234 268
235 269
236 ;; Moved from x-toolbar.el, since InfoDock doesn't dump a x-toolbar.el. 270 ;; Moved from x-toolbar.el, since InfoDock doesn't dump a x-toolbar.el.
237 (defun x-init-toolbar-from-resources (locale) 271 (defun x-init-toolbar-from-resources (locale)
238 (loop for (specifier . resname) in 272 (loop for (specifier . resname) in