diff options
author | Dave Love <[email protected]> | 2003-01-03 20:16:56 +0000 |
---|---|---|
committer | Dave Love <[email protected]> | 2003-01-03 20:16:56 +0000 |
commit | b439e72aa87d4e3491ecdebc0c1aebbe0f48c9c1 (patch) | |
tree | c4447b6f168bc3e020ce417f08c655fd9ef85fa6 /lisp/international/mule-cmds.el | |
parent | 13d472b8713781b30efecf43a3ffd9c657cff850 (diff) |
(sort-coding-systems): Adjust
priority of utf-16 and x-ctext.
Diffstat (limited to 'lisp/international/mule-cmds.el')
-rw-r--r-- | lisp/international/mule-cmds.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index d5b7663c5f..c70fa7a43a 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -425,9 +425,18 @@ non-nil, it is used to sort CODINGS in the different way than above." (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)) |