comparison lisp/international/mule.el @ 34297:8fffee49b42e

(decode-char, encode-char): Doc fix. (auto-coding-alist): Customize.
author Dave Love <fx@gnu.org>
date Wed, 06 Dec 2000 18:47:48 +0000
parents 3c1b837399d9
children 8f397d03b992
comparison
equal deleted inserted replaced
34296:98daea465817 34297:8fffee49b42e
290 (not (eq (car l) 'composition)))))) 290 (not (eq (car l) 'composition))))))
291 291
292 (defun decode-char (ccs code-point &optional restriction) 292 (defun decode-char (ccs code-point &optional restriction)
293 "Return character specified by coded character set CCS and CODE-POINT in it. 293 "Return character specified by coded character set CCS and CODE-POINT in it.
294 Return nil if such a character is not supported. 294 Return nil if such a character is not supported.
295 Currently, supported coded character set is `ucs' (ISO/IEC 295 Currently the only supported coded character set is `ucs' (ISO/IEC
296 10646: Universal Multi-Octet Coded Character Set) only. 296 10646: Universal Multi-Octet Coded Character Set).
297 297
298 Optional argument RESTRICTION specifies a way to map the pair of CCS 298 Optional argument RESTRICTION specifies a way to map the pair of CCS
299 and CODE-POINT to a chracter. Currently not supported and just ignored." 299 and CODE-POINT to a chracter. Currently not supported and just ignored."
300 (cond ((eq ccs 'ucs) 300 (cond ((eq ccs 'ucs)
301 (cond ((< code-point 128) 301 (cond ((< code-point 128)
317 )))) 317 ))))
318 318
319 (defun encode-char (char ccs &optional restriction) 319 (defun encode-char (char ccs &optional restriction)
320 "Return code-point in coded character set CCS that corresponds to CHAR. 320 "Return code-point in coded character set CCS that corresponds to CHAR.
321 Return nil if CHAR is not included in CCS. 321 Return nil if CHAR is not included in CCS.
322 Currently, supported coded character set is `ucs' (ISO/IEC 322 Currently the only supported coded character set is `ucs' (ISO/IEC
323 10646: Universal Multi-Octet Coded Character Set) only. 323 10646: Universal Multi-Octet Coded Character Set).
324 324
325 CHAR should be in one of these charsets: 325 CHAR should be in one of these charsets:
326 ascii, latin-iso8859-1, mule-unicode-0100-24ff, mule-unicode-2500-33ff, 326 ascii, latin-iso8859-1, mule-unicode-0100-24ff, mule-unicode-2500-33ff,
327 mule-unicode-e000-ffff 327 mule-unicode-e000-ffff
328 Otherwise, return nil. 328 Otherwise, return nil.
345 ((eq charset 'mule-unicode-e000-ffff) 345 ((eq charset 'mule-unicode-e000-ffff)
346 (+ #xe000 (+ (* (- (nth 1 split) 32) 96) 346 (+ #xe000 (+ (* (- (nth 1 split) 32) 96)
347 (- (nth 2 split) 32))))))))) 347 (- (nth 2 split) 32)))))))))
348 348
349 349
350 ;; Coding system staffs 350 ;; Coding system stuff
351 351
352 ;; Coding system is a symbol that has the property `coding-system'. 352 ;; Coding system is a symbol that has the property `coding-system'.
353 ;; 353 ;;
354 ;; The value of the property `coding-system' is a vector of the 354 ;; The value of the property `coding-system' is a vector of the
355 ;; following format: 355 ;; following format:
1078 (setq coding-category-list (append arg current-list)) 1078 (setq coding-category-list (append arg current-list))
1079 (set-coding-priority-internal))) 1079 (set-coding-priority-internal)))
1080 1080
1081 ;;; FILE I/O 1081 ;;; FILE I/O
1082 1082
1083 (defvar auto-coding-alist 1083 (defcustom auto-coding-alist
1084 '(("\\.\\(arc\\|zip\\|lzh\\|zoo\\|jar\\|tar\\|tgz\\)\\'" . no-conversion) 1084 '(("\\.\\(arc\\|zip\\|lzh\\|zoo\\|jar\\|tar\\|tgz\\)\\'" . no-conversion)
1085 ("\\.\\(ARC\\|ZIP\\|LZH\\|ZOO\\|JAR\\|TAR\\|TGZ\\)\\'" . no-conversion)) 1085 ("\\.\\(ARC\\|ZIP\\|LZH\\|ZOO\\|JAR\\|TAR\\|TGZ\\)\\'" . no-conversion))
1086 "Alist of filename patterns vs corresponding coding systems. 1086 "Alist of filename patterns vs corresponding coding systems.
1087 Each element looks like (REGEXP . CODING-SYSTEM). 1087 Each element looks like (REGEXP . CODING-SYSTEM).
1088 A file whose name matches REGEXP is decoded by CODING-SYSTEM on reading. 1088 A file whose name matches REGEXP is decoded by CODING-SYSTEM on reading.
1089 1089
1090 The settings in this alist take priority over `coding:' tags 1090 The settings in this alist take priority over `coding:' tags
1091 in the file (see the function `set-auto-coding') 1091 in the file (see the function `set-auto-coding')
1092 and the contents of `file-coding-system-alist'.") 1092 and the contents of `file-coding-system-alist'."
1093 :group 'files
1094 :group 'mule
1095 :type '(repeat (cons (regexp :tag "File name regexp")
1096 (symbol :tag "Coding system"))))
1093 1097
1094 (defvar set-auto-coding-for-load nil 1098 (defvar set-auto-coding-for-load nil
1095 "Non-nil means look for `load-coding' property instead of `coding'. 1099 "Non-nil means look for `load-coding' property instead of `coding'.
1096 This is used for loading and byte-compiling Emacs Lisp files.") 1100 This is used for loading and byte-compiling Emacs Lisp files.")
1097 1101