changeset 49029:835ac7993b8d

(sort-coding-systems): Adjust priority of utf-16 and x-ctext.
author Dave Love <fx@gnu.org>
date Fri, 03 Jan 2003 20:16:11 +0000
parents 79573bfb2899
children 941130502bf4
files lisp/international/mule-cmds.el
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Fri Jan 03 20:12:51 2003 +0000
+++ b/lisp/international/mule-cmds.el	Fri Jan 03 20:16:11 2003 +0000
@@ -425,9 +425,18 @@
 		    (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 ((or (eq base 'mule-utf-16-le)
+					  (eq base 'mule-utf-16-be))
+				      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))