comparison lisp/x-init.el @ 253:157b30c96d03 r20-5b25

Import from CVS: tag r20-5b25
author cvs
date Mon, 13 Aug 2007 10:20:27 +0200
parents 41f2f0e326e9
children c42ec1d1cded
comparison
equal deleted inserted replaced
252:afb15df44434 253:157b30c96d03
95 ;; Specifically, load some code to repair the grievous damage that MIT and 95 ;; Specifically, load some code to repair the grievous damage that MIT and
96 ;; Sun have done to the default keymap for the Sun keyboards. 96 ;; Sun have done to the default keymap for the Sun keyboards.
97 97
98 (eval-when-compile 98 (eval-when-compile
99 (defmacro x-define-dead-key (key map) 99 (defmacro x-define-dead-key (key map)
100 `(when (x-keysym-on-keyboard-p ,(symbol-name key)) 100 `(when (x-keysym-on-keyboard-p ',key)
101 (define-key function-key-map [,key] ',map)))) 101 (define-key function-key-map [,key] ',map))))
102 102
103 (defun x-initialize-compose () 103 (defun x-initialize-compose ()
104 "Enable compose processing" 104 "Enable compose processing"
105 (autoload 'compose-map "x-compose" nil t 'keymap) 105 (autoload 'compose-map "x-compose" nil t 'keymap)
108 (autoload 'compose-cedilla-map "x-compose" nil t 'keymap) 108 (autoload 'compose-cedilla-map "x-compose" nil t 'keymap)
109 (autoload 'compose-diaeresis-map "x-compose" nil t 'keymap) 109 (autoload 'compose-diaeresis-map "x-compose" nil t 'keymap)
110 (autoload 'compose-circumflex-map "x-compose" nil t 'keymap) 110 (autoload 'compose-circumflex-map "x-compose" nil t 'keymap)
111 (autoload 'compose-tilde-map "x-compose" nil t 'keymap) 111 (autoload 'compose-tilde-map "x-compose" nil t 'keymap)
112 112
113 (when (x-keysym-on-keyboard-p "Multi_key") 113 (when (x-keysym-on-keyboard-p 'multi-key)
114 (define-key function-key-map [multi-key] 'compose-map)) 114 (define-key function-key-map [multi-key] 'compose-map))
115 115
116 ;; The dead keys might really be called just about anything, depending 116 ;; The dead keys might really be called just about anything, depending
117 ;; on the vendor. MIT thinks that the prefixes are "SunFA_", "D", and 117 ;; on the vendor. MIT thinks that the prefixes are "SunFA_", "D", and
118 ;; "hpmute_" for Sun, DEC, and HP respectively. However, OpenWindows 3 118 ;; "hpmute_" for Sun, DEC, and HP respectively. However, OpenWindows 3
179 (x-define-dead-key hpmute_grave compose-grave-map) 179 (x-define-dead-key hpmute_grave compose-grave-map)
180 (x-define-dead-key hpmute_diaeresis compose-diaeresis-map) 180 (x-define-dead-key hpmute_diaeresis compose-diaeresis-map)
181 (x-define-dead-key hpmute_asciicircum compose-circumflex-map) 181 (x-define-dead-key hpmute_asciicircum compose-circumflex-map)
182 (x-define-dead-key hpmute_asciitilde compose-tilde-map) 182 (x-define-dead-key hpmute_asciitilde compose-tilde-map)
183 183
184 ;; Empirically discovered on Linux XFree86 MetroX:
185 (x-define-dead-key usldead_acute compose-acute-map)
186 (x-define-dead-key usldead_grave compose-grave-map)
187 (x-define-dead-key usldead_diaeresis compose-diaeresis-map)
188 (x-define-dead-key usldead_asciicircum compose-circumflex-map)
189 (x-define-dead-key usldead_asciitilde compose-tilde-map)
190
184 ;; HP according to OpenWindows 3: 191 ;; HP according to OpenWindows 3:
185 (x-define-dead-key hpXK_mute_acute compose-acute-map) 192 (x-define-dead-key hpXK_mute_acute compose-acute-map)
186 (x-define-dead-key hpXK_mute_grave compose-grave-map) 193 (x-define-dead-key hpXK_mute_grave compose-grave-map)
187 (x-define-dead-key hpXK_mute_diaeresis compose-diaeresis-map) 194 (x-define-dead-key hpXK_mute_diaeresis compose-diaeresis-map)
188 (x-define-dead-key hpXK_mute_asciicircum compose-circumflex-map) 195 (x-define-dead-key hpXK_mute_asciicircum compose-circumflex-map)
200 (x-define-dead-key dead-grave compose-grave-map) 207 (x-define-dead-key dead-grave compose-grave-map)
201 (x-define-dead-key dead-cedilla compose-cedilla-map) 208 (x-define-dead-key dead-cedilla compose-cedilla-map)
202 (x-define-dead-key dead-diaeresis compose-diaeresis-map) 209 (x-define-dead-key dead-diaeresis compose-diaeresis-map)
203 (x-define-dead-key dead-circum compose-circumflex-map) 210 (x-define-dead-key dead-circum compose-circumflex-map)
204 (x-define-dead-key dead-tilde compose-tilde-map) 211 (x-define-dead-key dead-tilde compose-tilde-map)
205
206 ;; and AIX uses underscore, sigh....
207 (x-define-dead-key dead_acute compose-acute-map)
208 (x-define-dead-key dead_grave compose-grave-map)
209 (x-define-dead-key dead_cedilla compose-cedilla-map)
210 (x-define-dead-key dead_diaeresis compose-diaeresis-map)
211 (x-define-dead-key dead_circum compose-circumflex-map)
212 (x-define-dead-key dead_tilde compose-tilde-map)
213 ) 212 )
214 213
215 (defun x-initialize-keyboard () 214 (defun x-initialize-keyboard ()
216 "Perform X-Server-specific initializations. Don't call this." 215 "Perform X-Server-specific initializations. Don't call this."
217 ;; This is some heuristic junk that tries to guess whether this is 216 ;; This is some heuristic junk that tries to guess whether this is