diff lisp/x-init.el @ 5529:3d1f8f0e690f

Add `function-key-map-parent', for non-console-specific `function-key-map' bindings src/ChangeLog addition: 2011-06-25 Aidan Kehoe <kehoea@parhasard.net> * console.c: * console.c (allocate_console): * console.c (vars_of_console): * console.c (complex_vars_of_console): * lisp.h: Add a new keymap variable, function-key-map-parent; use it as the parent of each console-specific function-key-map. This is appropriate for things like x-compose processing. lisp/ChangeLog addition: 2011-06-25 Aidan Kehoe <kehoea@parhasard.net> * gtk-init.el: * gtk-init.el (make-device-late-gtk-entry-point): * gtk-init.el (gtk-initialize-compose): Removed. * keymap.el: * keymap.el (function-key-map-parent): * x-init.el (x-initialize-compose): Removed. * x-init.el (make-device-late-x-entry-point): Make the bindings for dead-acute and friends in function-key-map-parent, rather than function-key-map; do this in keymap.el rather than in window-system-specific code, since the compose processing is generally useful and not X11-specific. It's probably reasonable to rename x-compose.el to compose.el at this point, but I haven't done that. man/ChangeLog addition: 2011-06-25 Aidan Kehoe <kehoea@parhasard.net> * lispref/os.texi (Translating Input): Document the just-added function-key-map-parent.
author Aidan Kehoe <kehoea@parhasard.net>
date Sat, 25 Jun 2011 14:00:48 +0100
parents 308d34e9f07d
children 1d1f385c9149
line wrap: on
line diff
--- a/lisp/x-init.el	Fri Jun 24 19:59:35 2011 +0100
+++ b/lisp/x-init.el	Sat Jun 25 14:00:48 2011 +0100
@@ -79,143 +79,6 @@
   (interactive)
   (ow-find t))
 
-;; Load X-server specific code.
-;; Specifically, load some code to repair the grievous damage that MIT and
-;; Sun have done to the default keymap for the Sun keyboards.
-(defun x-initialize-compose (device)
-  "Enable compose key and dead key processing on DEVICE."
-  (loop for map in '(compose-map compose-acute-map compose-grave-map
-                     compose-cedilla-map compose-diaeresis-map
-                     compose-circumflex-map compose-tilde-map
-                     compose-ring-map compose-caron-map compose-macron-map
-                     compose-breve-map compose-dot-map
-                     compose-doubleacute-map compose-ogonek-map
-                     compose-hook-map compose-horn-map compose-stroke-map)
-    do (autoload map "x-compose" nil t 'keymap))
-
-  (loop 
-    for (key map)
-    ;; The dead keys might really be called just about anything, depending
-    ;; on the vendor.  MIT thinks that the prefixes are "SunFA_", "D", and
-    ;; "hpmute_" for Sun, DEC, and HP respectively.  However, OpenWindows 3
-    ;; thinks that the prefixes are "SunXK_FA_", "DXK_", and "hpXK_mute_".
-    ;; And HP (who don't mention Sun and DEC at all) use "XK_mute_".  Go
-    ;; figure.
-
-    ;; Presumably if someone is running OpenWindows, they won't be using the
-    ;; DEC or HP keysyms, but if they are defined then that is possible, so
-    ;; in that case we accept them all.
-
-    ;; If things seem not to be working, you might want to check your
-    ;; /usr/lib/X11/XKeysymDB file to see if your vendor has an equally
-    ;; mixed up view of what these keys should be called.
-
-    ;; Canonical names:
-    in '((acute			compose-acute-map)
-         (grave			compose-grave-map)
-         (cedilla		compose-cedilla-map)
-         (diaeresis		compose-diaeresis-map)
-         (circumflex		compose-circumflex-map)
-         (tilde			compose-tilde-map)
-         (degree			compose-ring-map)
-         (multi-key              compose-map)
-
-         ;; Sun according to MIT:
-         (SunFA_Acute		compose-acute-map)
-         (SunFA_Grave		compose-grave-map)
-         (SunFA_Cedilla		compose-cedilla-map)
-         (SunFA_Diaeresis	compose-diaeresis-map)
-         (SunFA_Circum		compose-circumflex-map)
-         (SunFA_Tilde		compose-tilde-map)
-
-         ;; Sun according to OpenWindows 2:
-         (Dead_Grave		compose-grave-map)
-         (Dead_Circum		compose-circumflex-map)
-         (Dead_Tilde		compose-tilde-map)
-
-         ;; Sun according to OpenWindows 3:
-         (SunXK_FA_Acute		compose-acute-map)
-         (SunXK_FA_Grave		compose-grave-map)
-         (SunXK_FA_Cedilla	compose-cedilla-map)
-         (SunXK_FA_Diaeresis	compose-diaeresis-map)
-         (SunXK_FA_Circum	compose-circumflex-map)
-         (SunXK_FA_Tilde		compose-tilde-map)
-
-         ;; DEC according to MIT:
-         (Dacute_accent		compose-acute-map)
-         (Dgrave_accent		compose-grave-map)
-         (Dcedilla_accent	compose-cedilla-map)
-         (Dcircumflex_accent	compose-circumflex-map)
-         (Dtilde			compose-tilde-map)
-         (Dring_accent		compose-ring-map)
-
-         ;; DEC according to OpenWindows 3:
-         (DXK_acute_accent	compose-acute-map)
-         (DXK_grave_accent	compose-grave-map)
-         (DXK_cedilla_accent	compose-cedilla-map)
-         (DXK_circumflex_accent	compose-circumflex-map)
-         (DXK_tilde		compose-tilde-map)
-         (DXK_ring_accent	compose-ring-map)
-
-         ;; HP according to MIT:
-         (hpmute_acute		compose-acute-map)
-         (hpmute_grave		compose-grave-map)
-         (hpmute_diaeresis	compose-diaeresis-map)
-         (hpmute_asciicircum	compose-circumflex-map)
-         (hpmute_asciitilde	compose-tilde-map)
-
-         ;; Empirically discovered on Linux XFree86 MetroX:
-         (usldead_acute		compose-acute-map)
-         (usldead_grave		compose-grave-map)
-         (usldead_diaeresis	compose-diaeresis-map)
-         (usldead_asciicircum	compose-circumflex-map)
-         (usldead_asciitilde	compose-tilde-map)
-
-         ;; HP according to OpenWindows 3:
-         (hpXK_mute_acute	compose-acute-map)
-         (hpXK_mute_grave	compose-grave-map)
-         (hpXK_mute_diaeresis	compose-diaeresis-map)
-         (hpXK_mute_asciicircum	compose-circumflex-map)
-         (hpXK_mute_asciitilde	compose-tilde-map)
-
-         ;; HP according to HP-UX 8.0:
-         (XK_mute_acute		compose-acute-map)
-         (XK_mute_grave		compose-grave-map)
-         (XK_mute_diaeresis	compose-diaeresis-map)
-         (XK_mute_asciicircum	compose-circumflex-map)
-         (XK_mute_asciitilde	compose-tilde-map)
-
-         ;; [[ XFree86 seems to use lower case and a hyphen ]] Not true;
-         ;; they use lower case and an underscore. XEmacs converts the
-         ;; underscore to a hyphen in x_keysym_to_emacs_keysym because the
-         ;; keysym is in the "Keyboard" character set, which is just totally
-         ;; fucking random, considering it doesn't happen for any other
-         ;; character sets.
-         (dead-acute		compose-acute-map)
-         (dead-grave		compose-grave-map)
-         (dead-cedilla		compose-cedilla-map)
-         (dead-diaeresis	compose-diaeresis-map)
-         (dead-circum		compose-circumflex-map)
-         (dead-circumflex	compose-circumflex-map)
-         (dead-tilde		compose-tilde-map)
-         (dead-abovering        compose-ring-map)
-         (dead-caron            compose-caron-map)
-         (dead-macron           compose-macron-map)
-         (dead-breve            compose-breve-map)
-         (dead-abovedot         compose-dot-map)
-         (dead-doubleacute      compose-doubleacute-map)
-         (dead-ogonek           compose-ogonek-map)
-         (dead-hook             compose-hook-map)
-         (dead-horn             compose-horn-map)
-	 (dead-stroke		compose-stroke-map))
-    
-    ;; Get the correct value for function-key-map
-    with function-key-map = (symbol-value-in-console 'function-key-map
-                                                     (device-console device)
-                                                     function-key-map)
-    do (when (x-keysym-on-keyboard-p key device)
-         (define-key function-key-map (vector key) map))))
-
 (eval-when-compile
   (load "x-win-sun"     nil t)
   (load "x-win-xfree86" nil t))
@@ -291,7 +154,6 @@
   "Entry point to do any Lisp-level X device-specific initialization."
   ;; General code, called on every X device created:
   (x-initialize-keyboard device)
-  (x-initialize-compose device)
   ;; And the following code is to be called once, the first time an X11
   ;; device is created:
   (unless make-device-late-x-entry-point-called-p