summaryrefslogtreecommitdiff
path: root/lisp/gnus/mm-util.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2009-01-14 07:51:26 +0000
committerMiles Bader <miles@gnu.org>2009-01-14 07:51:26 +0000
commit548f737d3a7bf854870eb537013389c01839a350 (patch)
tree9a58eb31178713694f70785a207a41a5cefedf85 /lisp/gnus/mm-util.el
parent0f9eec14d97c9c37505915673b84d1f26ff4eba6 (diff)
downloademacs-548f737d3a7bf854870eb537013389c01839a350.tar.gz
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1517
Diffstat (limited to 'lisp/gnus/mm-util.el')
-rw-r--r--lisp/gnus/mm-util.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 3d8538d4a61..403d967f8e4 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -840,13 +840,16 @@ Valid elements include:
"A table of the difference character between ISO-8859-X and ISO-8859-15.")
(defcustom mm-coding-system-priorities
- (if (boundp 'current-language-environment)
- (let ((lang (symbol-value 'current-language-environment)))
- (cond ((string= lang "Japanese")
- ;; Japanese users prefer iso-2022-jp to euc-japan or
- ;; shift_jis, however iso-8859-1 should be used when
- ;; there are only ASCII text and Latin-1 characters.
- '(iso-8859-1 iso-2022-jp iso-2022-jp-2 shift_jis utf-8)))))
+ (let ((lang (if (boundp 'current-language-environment)
+ (symbol-value 'current-language-environment))))
+ (cond (;; XEmacs without Mule but with `file-coding'.
+ (not lang) nil)
+ ;; In XEmacs 21.5 it may be the one like "Japanese (UTF-8)".
+ ((string-match "\\`Japanese" lang)
+ ;; Japanese users prefer iso-2022-jp to euc-japan or
+ ;; shift_jis, however iso-8859-1 should be used when
+ ;; there are only ASCII text and Latin-1 characters.
+ '(iso-8859-1 iso-2022-jp iso-2022-jp-2 shift_jis utf-8))))
"Preferred coding systems for encoding outgoing messages.
More than one suitable coding system may be found for some text.