# HG changeset patch # User aidan # Date 1112065161 0 # Node ID 96036853a10791df126d88a5a4b014143af2973a # Parent d8df26f08486246a2219d965d26bf4fcbfc709a0 [xemacs-hg @ 2005-03-29 02:58:56 by aidan] Support X11 keysyms of the form UABCD. diff -r d8df26f08486 -r 96036853a107 lisp/ChangeLog --- a/lisp/ChangeLog Tue Mar 29 02:52:50 2005 +0000 +++ b/lisp/ChangeLog Tue Mar 29 02:59:21 2005 +0000 @@ -1,3 +1,9 @@ +2005-03-29 Aidan Kehoe + + * startup.el (command-line): Move Mule initialisation before + window-system initialisation, because the latter depends on + Unicode support with X11 and Unicode keysyms. + 2005-03-28 Aidan Kehoe * register.el (insert-register): Revert part of Ben's incomplete diff -r d8df26f08486 -r 96036853a107 lisp/startup.el --- a/lisp/startup.el Tue Mar 29 02:52:50 2005 +0000 +++ b/lisp/startup.el Tue Mar 29 02:59:21 2005 +0000 @@ -703,6 +703,11 @@ (when (featurep 'toolbar) (init-toolbar-location)) + ;; Setup coding systems and Unicode support--needs to be before X11 + ;; initialisation in case of keysyms of the form UABCD. + (when (featurep 'mule) + (declare-fboundp (init-mule-at-startup))) + (if (featurep 'toolbar) (if (featurep 'infodock) (require 'id-x-toolbar) @@ -736,10 +741,6 @@ ;; In this case, I completely agree. --ben (if (featurep 'menubar) (init-menubar-at-startup)) - ;; perhaps this should go earlier in the process? - (if (featurep 'mule) - (declare-fboundp (init-mule-at-startup))) - ;; ;; We have normality, I repeat, we have normality. Anything you still ;; can't cope with is therefore your own problem. (And we don't need diff -r d8df26f08486 -r 96036853a107 src/ChangeLog --- a/src/ChangeLog Tue Mar 29 02:52:50 2005 +0000 +++ b/src/ChangeLog Tue Mar 29 02:59:21 2005 +0000 @@ -1,3 +1,9 @@ +2005-03-29 Aidan Kehoe + + * event-Xt.c: Declare Funicode_to_char. + * event-Xt.c (x_keysym_to_character): Use it, if we're handed a + keysym for which it's appropriate. + 2005-03-26 Jerry James * dumper.c (BACKTRACE_MAX): New constant defining length of static diff -r d8df26f08486 -r 96036853a107 src/event-Xt.c --- a/src/event-Xt.c Tue Mar 29 02:52:50 2005 +0000 +++ b/src/event-Xt.c Tue Mar 29 02:59:21 2005 +0000 @@ -71,6 +71,8 @@ extern int mswindows_is_blocking; #endif +EXFUN (Funicode_to_char, 2); /* In unicode.c. */ + /* used in glyphs-x.c */ void enqueue_focus_event (Widget wants_it, Lisp_Object frame, int in_p); static void handle_focus_event_1 (struct frame *f, int in_p); @@ -201,6 +203,15 @@ if ((keysym & 0xff) < 0xa0) return Qnil; + /* The spec says keysyms in the range #x01000100 to #x0110FFFF and + only those should correspond directly to Unicode code points, in + the range #x100-#x10FFFF; actual implementations can have the Latin + 1 code points do the same thing with keysyms + #x010000A0-#x01000100. Oops. */ + + if (keysym >= 0x010000A0 && keysym <= 0x0110FFFF) + return Funicode_to_char (make_int(keysym & 0xffffff), Qnil); + switch (keysym >> 8) { case 0: /* ASCII + Latin1 */