comparison lisp/x-iso8859-1.el @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents 41ff10fd062f
children 74fd4e045ea6
comparison
equal deleted inserted replaced
379:76b7d63099ad 380:8626e4521993
42 ;; It puts the same property on the keypad keys, so that (read-char) will 42 ;; It puts the same property on the keypad keys, so that (read-char) will
43 ;; think that they are the same as the digit characters. However, those 43 ;; think that they are the same as the digit characters. However, those
44 ;; keys are bound to one-character keyboard macros, so that `kp-9' will, by 44 ;; keys are bound to one-character keyboard macros, so that `kp-9' will, by
45 ;; default, do the same thing that `9' does, in whatever the current mode is. 45 ;; default, do the same thing that `9' does, in whatever the current mode is.
46 46
47 ;; The standard case and syntax tables are set in prim/iso8859-1.el, since 47 ;; The standard case and syntax tables are set in iso8859-1.el, since
48 ;; that is not X-specific. 48 ;; that is not X-specific.
49 49
50 ;;; Code: 50 ;;; Code:
51 51
52 (require 'iso8859-1) 52 (require 'iso8859-1)
69 ;; 69 ;;
70 ;; First emit code that puts the `x-iso8859/1' property on all of 70 ;; First emit code that puts the `x-iso8859/1' property on all of
71 ;; the keysym symbols. 71 ;; the keysym symbols.
72 ;; 72 ;;
73 (mapcar '(lambda (sym-and-code) 73 (mapcar '(lambda (sym-and-code)
74 (list 'put (list 'quote (car sym-and-code)) 74 (list 'put (list 'quote (car sym-and-code))
75 ''x-iso8859/1 (car (cdr sym-and-code)))) 75 ''x-iso8859/1 (car (cdr sym-and-code))))
76 syms-and-iso8859/1-codes) 76 syms-and-iso8859/1-codes)
77 ;; 77 ;;
78 ;; Then emit code that binds all of those keysym symbols to 78 ;; Then emit code that binds all of those keysym symbols to
79 ;; `self-insert-command'. 79 ;; `self-insert-command'.
80 ;; 80 ;;
81 (mapcar '(lambda (sym-and-code) 81 (mapcar '(lambda (sym-and-code)
82 (list 'global-set-key (list 'quote (car sym-and-code)) 82 (list 'global-set-key (list 'quote (car sym-and-code))
83 ''self-insert-command)) 83 ''self-insert-command))
84 syms-and-iso8859/1-codes) 84 syms-and-iso8859/1-codes)
85 ;; 85 ;;
86 ;; Then emit the value of iso8859/1-code-to-x-keysym-table. 86 ;; Then emit the value of iso8859/1-code-to-x-keysym-table.
87 ;; 87 ;;
88 (let ((v (make-vector 256 nil))) 88 (let ((v (make-vector 256 nil)))
94 ;; these are from the keyboard character set. 94 ;; these are from the keyboard character set.
95 (mapcar '(lambda (x) (aset v (car x) (car (cdr x)))) 95 (mapcar '(lambda (x) (aset v (car x) (car (cdr x))))
96 '((8 backspace) (9 tab) (10 linefeed) (13 return) 96 '((8 backspace) (9 tab) (10 linefeed) (13 return)
97 (27 escape) (32 space) (127 delete))) 97 (27 escape) (32 space) (127 delete)))
98 (mapcar '(lambda (sym-and-code) 98 (mapcar '(lambda (sym-and-code)
99 (or (aref v (car (cdr sym-and-code))) 99 (or (aref v (car (cdr sym-and-code)))
100 (aset v (car (cdr sym-and-code)) (car sym-and-code)))) 100 (aset v (car (cdr sym-and-code)) (car sym-and-code))))
101 syms-and-iso8859/1-codes) 101 syms-and-iso8859/1-codes)
102 (list (list 'setq 'iso8859/1-code-to-x-keysym-table v))) 102 (list (list 'setq 'iso8859/1-code-to-x-keysym-table v)))
103 )))) 103 ))))
104 104
105 ;; The names and capitalization here are as per the MIT X11R4 and X11R5 105 ;; The names and capitalization here are as per the MIT X11R4 and X11R5
209 ) 209 )
210 210
211 ((macro . (lambda (&rest syms-and-iso8859/1-codes) 211 ((macro . (lambda (&rest syms-and-iso8859/1-codes)
212 (cons 'progn 212 (cons 'progn
213 (mapcar '(lambda (sym-and-code) 213 (mapcar '(lambda (sym-and-code)
214 (list 'put (list 'quote (car sym-and-code)) 214 (list 'put (list 'quote (car sym-and-code))
215 ''x-iso8859/1 (car (cdr sym-and-code)))) 215 ''x-iso8859/1 (car (cdr sym-and-code))))
216 syms-and-iso8859/1-codes)))) 216 syms-and-iso8859/1-codes))))
217 ;; 217 ;;
218 ;; Let's do the appropriate thing for some vendor-specific keysyms too... 218 ;; Let's do the appropriate thing for some vendor-specific keysyms too...
219 ;; Apparently nobody agrees on what the names of these keysyms are. 219 ;; Apparently nobody agrees on what the names of these keysyms are.
220 ;; 220 ;;