comparison lisp/international/mule.el @ 64125:9f966287a535

(make-coding-system): Describe `ascii-incompatible' property in the docstring. (set-file-name-coding-system): Signal an error if coding-system is ascii-incompatible. (set-keyboard-coding-system): Likewise.
author Kenichi Handa <handa@m17n.org>
date Thu, 07 Jul 2005 06:21:30 +0000
parents 18a818a2ee7c
children 62fe32ed4496 24c69010999c
comparison
equal deleted inserted replaced
64124:8ee5c917c069 64125:9f966287a535
836 836
837 o composition (meaningful only when TYPE is 0 or 2) 837 o composition (meaningful only when TYPE is 0 or 2)
838 838
839 If the value is non-nil, the coding system preserves composition 839 If the value is non-nil, the coding system preserves composition
840 information. 840 information.
841
842 o ascii-incompatible
843
844 If the value is non-nil, the coding system is not compatible
845 with ASCII, which means it encodes or decodes ASCII character
846 string to the different byte sequence.
841 847
842 These properties are set in PLIST, a property list. This function 848 These properties are set in PLIST, a property list. This function
843 also sets properties `coding-category' and `alias-coding-systems' 849 also sets properties `coding-category' and `alias-coding-systems'
844 automatically. 850 automatically.
845 851
1189 "Set coding system for decoding and encoding file names to CODING-SYSTEM. 1195 "Set coding system for decoding and encoding file names to CODING-SYSTEM.
1190 It actually just set the variable `file-name-coding-system' (which 1196 It actually just set the variable `file-name-coding-system' (which
1191 see) to CODING-SYSTEM." 1197 see) to CODING-SYSTEM."
1192 (interactive "zCoding system for file names (default, nil): ") 1198 (interactive "zCoding system for file names (default, nil): ")
1193 (check-coding-system coding-system) 1199 (check-coding-system coding-system)
1200 (if (and coding-system
1201 (coding-system-get coding-system 'ascii-incompatible))
1202 (error "%s is not ASCII-compatible" coding-system))
1194 (setq file-name-coding-system coding-system)) 1203 (setq file-name-coding-system coding-system))
1195 1204
1196 (defvar default-terminal-coding-system nil 1205 (defvar default-terminal-coding-system nil
1197 "Default value for the terminal coding system. 1206 "Default value for the terminal coding system.
1198 This is normally set according to the selected language environment. 1207 This is normally set according to the selected language environment.
1245 (if (and (not coding-system) 1254 (if (and (not coding-system)
1246 (not (keyboard-coding-system))) 1255 (not (keyboard-coding-system)))
1247 (setq coding-system default-keyboard-coding-system)) 1256 (setq coding-system default-keyboard-coding-system))
1248 (if coding-system 1257 (if coding-system
1249 (setq default-keyboard-coding-system coding-system)) 1258 (setq default-keyboard-coding-system coding-system))
1259 (if (and coding-system
1260 (coding-system-get coding-system 'ascii-incompatible))
1261 (error "%s is not ASCII-compatible" coding-system))
1250 (set-keyboard-coding-system-internal coding-system) 1262 (set-keyboard-coding-system-internal coding-system)
1251 (setq keyboard-coding-system coding-system) 1263 (setq keyboard-coding-system coding-system)
1252 (encoded-kbd-mode (if coding-system 1 0))) 1264 (encoded-kbd-mode (if coding-system 1 0)))
1253 1265
1254 (defcustom keyboard-coding-system nil 1266 (defcustom keyboard-coding-system nil