* mm-util.el (mm-mime-mule-charset-alist): Use unicode-precedence-list
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 6 Jun 2006 06:27:43 +0000 (06:27 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 6 Jun 2006 06:27:43 +0000 (06:27 +0000)
to fill the utf-8 entry.

* lpath.el: Fbind unicode-precedence-list.

lisp/ChangeLog
lisp/lpath.el
lisp/mm-util.el

index 5d6a3bc..03ffd57 100644 (file)
@@ -1,3 +1,10 @@
+2006-06-06  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mm-util.el (mm-mime-mule-charset-alist): Use unicode-precedence-list
+       to fill the utf-8 entry.
+
+       * lpath.el: Fbind unicode-precedence-list.
+
 2006-06-01  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
 
        * nnweb.el (nnweb-google-parse-1): Update regexp for author and date.
index 7db113c..a55f0c9 100644 (file)
               replace-regexp-in-string rmail-msg-is-pruned
               rmail-msg-restore-non-pruned-header sort-coding-systems
               tool-bar-add-item tool-bar-add-item-from-menu
-              tool-bar-local-item-from-menu url-generic-parse-url
-              url-http-file-exists-p url-insert-file-contents
-              vcard-pretty-print w32-focus-frame w3m-detect-meta-charset
-              w3m-region x-focus-frame))
+              tool-bar-local-item-from-menu unicode-precedence-list
+              url-generic-parse-url url-http-file-exists-p
+              url-insert-file-contents vcard-pretty-print w32-focus-frame
+              w3m-detect-meta-charset w3m-region x-focus-frame))
 (maybe-bind '(eudc-protocol
              filladapt-mode rmail-insert-mime-forwarded-message-function
              w3-meta-charset-content-type-regexp
index e05dc21..e4e1d42 100644 (file)
@@ -361,14 +361,17 @@ could use `autoload-coding-system' here."
     (iso-2022-jp-3 latin-jisx0201 japanese-jisx0208-1978 japanese-jisx0208
                   japanese-jisx0213-1 japanese-jisx0213-2)
     (shift_jis latin-jisx0201 katakana-jisx0201 japanese-jisx0208)
-    ,(if (or (not (fboundp 'charsetp)) ;; non-Mule case
-            (charsetp 'unicode-a)
-            (not (mm-coding-system-p 'mule-utf-8)))
-        '(utf-8 unicode-a unicode-b unicode-c unicode-d unicode-e)
-       ;; If we have utf-8 we're in Mule 5+.
-       (append '(utf-8)
-              (delete 'ascii
-                      (coding-system-get 'mule-utf-8 'safe-charsets)))))
+    ,(cond ((fboundp 'unicode-precedence-list)
+           (cons 'utf-8 (delq 'ascii (mapcar 'charset-name
+                                             (unicode-precedence-list)))))
+          ((or (not (fboundp 'charsetp)) ;; non-Mule case
+               (charsetp 'unicode-a)
+               (not (mm-coding-system-p 'mule-utf-8)))
+           '(utf-8 unicode-a unicode-b unicode-c unicode-d unicode-e))
+          (t ;; If we have utf-8 we're in Mule 5+.
+           (append '(utf-8)
+                   (delete 'ascii
+                           (coding-system-get 'mule-utf-8 'safe-charsets))))))
   "Alist of MIME-charset/MULE-charsets.")
 
 (defun mm-enrich-utf-8-by-mule-ucs ()