Mercurial > hg > xemacs-beta
diff lisp/mule/mule-cmds.el @ 448:3078fd1074e8 r21-2-39
Import from CVS: tag r21-2-39
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:38:25 +0200 |
parents | 576fb035e263 |
children | 7039e6323819 |
line wrap: on
line diff
--- a/lisp/mule/mule-cmds.el Mon Aug 13 11:37:23 2007 +0200 +++ b/lisp/mule/mule-cmds.el Mon Aug 13 11:38:25 2007 +0200 @@ -689,52 +689,68 @@ bound to each category are as follows coding category coding system -------------------------------------------------- - iso-8-2 iso-8859-1 + iso-7 iso-2022-7bit + no-conversion raw-text + utf-8 utf-8 iso-8-1 iso-8859-1 - iso-7 iso-2022-7bit + iso-8-2 ctext (iso-8859-1 alias) + iso-8-designate ctext (iso-8859-1 alias) iso-lock-shift iso-2022-lock - iso-8-designate iso-2022-8bit-ss2 - no-conversion raw-text shift-jis shift_jis big5 big5 - ucs-4 ---- - utf-8 ---- + ucs-4 iso-10646-ucs-4 " +;; The old table (from FSF synch?) was not what we use (cf mule-coding.el), +;; and as documented iso-8-designate is inconsistent with iso-2022-8bit-ss2. +;; The order of priorities of coding categories and the coding system +;; bound to each category are as follows +;; coding category coding system +;; -------------------------------------------------- +;; iso-8-2 iso-8859-1 +;; iso-8-1 iso-8859-1 +;; iso-7 iso-2022-7bit +;; iso-lock-shift iso-2022-lock +;; iso-8-designate iso-2022-8bit-ss2 +;; no-conversion raw-text +;; shift-jis shift_jis +;; big5 big5 +;; ucs-4 ---- +;; utf-8 ---- (interactive) - ;; This function formerly set default-enable-multibyte-characters to t, - ;; but that is incorrect. It should not alter the unibyte/multibyte choice. - (set-coding-category-system 'iso-7 'iso-2022-7bit) + (set-coding-category-system 'iso-7 'iso-2022-7) (set-coding-category-system 'iso-8-1 'iso-8859-1) - (set-coding-category-system 'iso-8-2 'iso-8859-1) + (set-coding-category-system 'iso-8-2 'ctext) (set-coding-category-system 'iso-lock-shift 'iso-2022-lock) - (set-coding-category-system 'iso-8-designate 'iso-2022-8bit-ss2) + (set-coding-category-system 'iso-8-designate 'ctext) (set-coding-category-system 'no-conversion 'raw-text) (set-coding-category-system 'shift-jis 'shift_jis) (set-coding-category-system 'big5 'big5) + ;; #### Can we now assume the existence of the 10646 coding systems? + ;; #### These lists need to be synched with the ones in mule-coding.el. (cond ((eq (coding-system-type (coding-category-system 'utf-8)) 'utf-8) (set-coding-category-system 'ucs-4 'iso-10646-ucs-4) (set-coding-category-system 'utf-8 'utf-8) (set-coding-priority-list - '(iso-8-1 + '(iso-7 + no-conversion + utf-8 + iso-8-1 iso-8-2 - iso-7 - iso-lock-shift iso-8-designate - utf-8 - ucs-4 - no-conversion + iso-lock-shift shift-jis - big5)) + big5 + ucs-4)) ) (t (set-coding-priority-list - '(iso-8-1 + '(iso-7 + no-conversion + iso-8-1 iso-8-2 - iso-7 + iso-8-designate iso-lock-shift - iso-8-designate - no-conversion shift-jis big5)) )) @@ -867,7 +883,17 @@ "Do various coding system setups for language environment LANGUAGE-NAME. The optional arg EOL-TYPE specifies the eol-type of the default value -of buffer-file-coding-system set by this function." +of buffer-file-coding-system set by this function. + +Note that `coding-priority-list' is not reset first; thus changing language +environment allows recognition of coding systems from previously set language +environments. (This will not work if the desired coding systems are from the +same category. E.g., starting with a Hebrew language environment, ISO 8859-8 +will be recognized. If you shift to Russian, ISO 8859-8 will be shadowed by +ISO 8859-5, and cannot be automatically recognized without resetting the +language environment to Hebrew. However, if you shift from Japanese to +Russian, ISO-2022-JP will continue to be automatically recognized, since +ISO-8859-5 and ISO-2022-JP are different coding categories.)" (let* ((priority (get-language-info language-name 'coding-priority)) (default-coding (car priority))) (if priority