]> git.eshelyaron.com Git - emacs.git/commitdiff
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-513
authorMiles Bader <miles@gnu.org>
Fri, 5 Aug 2005 08:48:40 +0000 (08:48 +0000)
committerMiles Bader <miles@gnu.org>
Fri, 5 Aug 2005 08:48:40 +0000 (08:48 +0000)
Merge from gnus--rel--5.10

Patches applied:

 * gnus--rel--5.10  (patch 103)

   - Update from CVS

2005-08-05  Katsumi Yamaoka  <yamaoka@jpl.org>

   * lisp/gnus/mm-bodies.el (mm-encode-body): Use coding system rather than
   charset to encode text.

   * lisp/gnus/mm-util.el (mm-find-mime-charset-region): Attempt to reduce the
   number of charsets if utf-8 is available (XEmacs).

lisp/gnus/ChangeLog
lisp/gnus/mm-bodies.el
lisp/gnus/mm-util.el

index 0efec1e14c13269b3c32b62bf3e20adff6d2546c..9f5ee5e1e33aaa5b3df5f593ec98667a5acd58b1 100644 (file)
@@ -1,3 +1,11 @@
+2005-08-05  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mm-bodies.el (mm-encode-body): Use coding system rather than
+       charset to encode text.
+
+       * mm-util.el (mm-find-mime-charset-region): Attempt to reduce the
+       number of charsets if utf-8 is available (XEmacs).
+
 2005-08-04  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-art.el (article-unsplit-urls): Don't anchor urls to the
index f58a840fbdd3fe6db2d178f976408a580ebae391..23900d0cbec02c988aa54a730cb8fc8fde08979f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mm-bodies.el --- Functions for decoding MIME things
 
-;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
+;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -95,7 +95,8 @@ If no encoding was done, nil is returned."
     (save-excursion
       (if charset
          (progn
-           (mm-encode-coding-region (point-min) (point-max) charset)
+           (mm-encode-coding-region (point-min) (point-max)
+                                    (mm-charset-to-coding-system charset))
            charset)
        (goto-char (point-min))
        (let ((charsets (mm-find-mime-charset-region (point-min) (point-max)
index a57389f59c49d8fa13e7732f6abd706b56b1663e..512fee70863e0e5f1472fbc6f8b0044a2d764d00 100644 (file)
@@ -766,6 +766,17 @@ charset, and a longer list means no appropriate charset."
     (if (and (memq 'iso-2022-jp-2 charsets)
             (memq 'iso-2022-jp-2 hack-charsets))
        (setq charsets (delq 'iso-2022-jp charsets)))
+    ;; Attempt to reduce the number of charsets if utf-8 is available.
+    (if (and (featurep 'xemacs)
+            (> (length charsets) 1)
+            (mm-coding-system-p 'utf-8))
+       (let ((mm-coding-system-priorities
+              (cons 'utf-8 mm-coding-system-priorities)))
+         (setq charsets
+               (mm-delete-duplicates
+                (mapcar 'mm-mime-charset
+                        (delq 'ascii
+                              (mm-find-charset-region b e)))))))
     charsets))
 
 (defmacro mm-with-unibyte-buffer (&rest forms)