]> git.eshelyaron.com Git - emacs.git/commitdiff
(sort-coding-systems): Set lower
authorKenichi Handa <handa@m17n.org>
Tue, 6 May 2003 06:59:34 +0000 (06:59 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 6 May 2003 06:59:34 +0000 (06:59 +0000)
priority to a utf-16 base coding system.

lisp/international/mule-cmds.el

index 64561dc4584f15f5cf131bbd44d040f6e5b0c276..9e863d6ee93afea4d265b0a47a8405a8bb626bc2 100644 (file)
@@ -398,9 +398,18 @@ non-nil, it is used to sort CODINGS differently from the above recipe."
                    (let ((base (coding-system-base x)))
                      (+ (if (eq base most-preferred) 64 0)
                         (let ((mime (coding-system-get base 'mime-charset)))
+                          ;; Prefer coding systems corresponding to a
+                          ;; MIME charset.
                           (if mime
-                              (if (string-match "^x-" (symbol-name mime))
-                                  16 32)
+                              ;; Lower utf-16 priority so that we
+                              ;; normally prefer utf-8 to it, and put
+                              ;; x-ctext below that.
+                              (cond ((string-match "^utf-16"
+                                                   (symbol-name mime))
+                                     16)
+                                    ((string-match "^x-" (symbol-name mime))
+                                     8)
+                                    (t 32))
                             0))
                         (if (memq base lang-preferred) 8 0)
                         (if (string-match "-with-esc$" (symbol-name base))