comparison lisp/mule/mule-coding.el @ 207:e45d5e7c476e r20-4b2

Import from CVS: tag r20-4b2
author cvs
date Mon, 13 Aug 2007 10:03:52 +0200
parents acd284d43ca1
children 1f0dabaa0855
comparison
equal deleted inserted replaced
206:d3e9274cbc4e 207:e45d5e7c476e
82 (setcdr slot coding-system) 82 (setcdr slot coding-system)
83 (setq network-coding-system-alist 83 (setq network-coding-system-alist
84 (cons (cons regexp coding-system) 84 (cons (cons regexp coding-system)
85 network-coding-system-alist))))))) 85 network-coding-system-alist)))))))
86 86
87 (defsubst keyboard-coding-system ()
88 "Return coding-system of what is sent from terminal keyboard."
89 keyboard-coding-system)
90
87 (defun set-keyboard-coding-system (coding-system) 91 (defun set-keyboard-coding-system (coding-system)
88 "Set the coding system used for TTY keyboard input. Currently broken." 92 "Set the coding system used for TTY keyboard input. Currently broken."
89 (interactive "zkeyboard-coding-system: ") 93 (interactive "zkeyboard-coding-system: ")
90 (get-coding-system coding-system) ; correctness check 94 (get-coding-system coding-system) ; correctness check
91 (setq keyboard-coding-system coding-system) 95 (setq keyboard-coding-system coding-system)
92 (redraw-modeline t)) 96 (redraw-modeline t))
93 97
98 (defsubst terminal-coding-system ()
99 "Return coding-system of your terminal."
100 terminal-coding-system)
101
94 (defun set-terminal-coding-system (coding-system) 102 (defun set-terminal-coding-system (coding-system)
95 "Set the coding system used for TTY display output. Currently broken." 103 "Set the coding system used for TTY display output. Currently broken."
96 (interactive "zterminal-coding-system: ") 104 (interactive "zterminal-coding-system: ")
97 (get-coding-system coding-system) ; correctness check 105 (get-coding-system coding-system) ; correctness check
98 (setq terminal-coding-system coding-system) 106 (setq terminal-coding-system coding-system)
153 (coding-system-property coding-system 'post-read-conversion)) 161 (coding-system-property coding-system 'post-read-conversion))
154 162
155 (defun coding-system-pre-write-conversion (coding-system) 163 (defun coding-system-pre-write-conversion (coding-system)
156 "Return the 'pre-write-conversion property of CODING-SYSTEM." 164 "Return the 'pre-write-conversion property of CODING-SYSTEM."
157 (coding-system-property coding-system 'pre-write-conversion)) 165 (coding-system-property coding-system 'pre-write-conversion))
158
159 (defun coding-system-charset (coding-system register)
160 "Return the 'charset property of CODING-SYSTEM for the specified REGISTER."
161 (unless (integerp register)
162 (signal 'wrong-type-argument (list 'integerp register)))
163 (coding-system-property
164 coding-system
165 (case register
166 (0 'charset-g0)
167 (1 'charset-g1)
168 (2 'charset-g2)
169 (3 'charset-g3)
170 (t (signal 'args-out-of-range (list register 0 3))))))
171 166
172 (defun coding-system-force-on-output (coding-system register) 167 (defun coding-system-force-on-output (coding-system register)
173 "Return the 'force-on-output property of CODING-SYSTEM for the specified REGISTER." 168 "Return the 'force-on-output property of CODING-SYSTEM for the specified REGISTER."
174 (unless (integerp register) 169 (unless (integerp register)
175 (signal 'wrong-type-argument (list 'integerp register))) 170 (signal 'wrong-type-argument (list 'integerp register)))
224 219
225 220
226 ;;;; Definitions of predefined coding systems 221 ;;;; Definitions of predefined coding systems
227 222
228 (make-coding-system 223 (make-coding-system
229 'automatic-conversion 'automatic-conversion 224 'undecided 'undecided
230 "Automatic conversion." 225 "Automatic conversion."
231 '(mnemonic "Auto")) 226 '(mnemonic "Auto"))
227
228 ;; compatibility for old XEmacsen (don't use it)
229 (copy-coding-system 'undecided 'automatic-conversion)
232 230
233 (make-coding-system 231 (make-coding-system
234 'ctext 'iso2022 232 'ctext 'iso2022
235 "Coding-system used in X as Compound Text Encoding." 233 "Coding-system used in X as Compound Text Encoding."
236 '(charset-g0 ascii 234 '(charset-g0 ascii