# HG changeset patch # User Kenichi Handa # Date 1141704836 0 # Node ID 6e94ff6be84897137dc9d0f3cdec086ab3afd543 # Parent 95ea8b972d57ce67be2e28bde4a3db481e72c955 (ctext-non-standard-encodings-table): Reverse the returning list. (ctext-pre-write-conversion): Fix encoding with extended segments. diff -r 95ea8b972d57 -r 6e94ff6be848 lisp/international/mule.el --- a/lisp/international/mule.el Tue Mar 07 04:12:45 2006 +0000 +++ b/lisp/international/mule.el Tue Mar 07 04:13:56 2006 +0000 @@ -1446,13 +1446,13 @@ (defun ctext-non-standard-encodings-table () (let (table) - ;; Setup charsets specified in `ctext-non-standard-encodings' and - ;; by the key `ctext-non-standard-encodings' for the current - ;; language environment. + ;; Setup charsets specified by the key + ;; `ctext-non-standard-encodings' for the current language + ;; environment and in `ctext-non-standard-encodings'. (dolist (encoding (append - ctext-non-standard-encodings (get-language-info current-language-environment - 'ctext-non-standard-encodings))) + 'ctext-non-standard-encodings) + ctext-non-standard-encodings)) (let* ((slot (assoc encoding ctext-non-standard-encodings-alist)) (charset (nth 3 slot))) (if (charsetp charset) @@ -1469,7 +1469,11 @@ (not (eq charset 'ascii)) (not (string-match "cns11643" (symbol-name charset)))) (push (cons charset nil) table)))) - table)) + + ;; Returned reversed list so that the charsets specified by the + ;; key `ctext-non-standard-encodings' for the current language + ;; have the highest priority. + (nreverse table))) (defun ctext-pre-write-conversion (from to) "Encode characters between FROM and TO as Compound Text w/Extended Segments. @@ -1528,7 +1532,8 @@ (insert (format "\e%%/%d" noctets)) (insert-byte (+ (/ len 128) 128) 1) (insert-byte (+ (% len 128) 128) 1) - (insert encoding-name)))) + (insert encoding-name) + (insert 2)))) ((eq last-encoding-info 'utf-8) ;; Encode the previous range using UTF-8 encoding ;; extention.