]> git.eshelyaron.com Git - emacs.git/commitdiff
(gnus-mime-replace-part): Remove unnecessary use of mm-with-multibyte.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 5 Apr 2008 20:12:37 +0000 (20:12 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 5 Apr 2008 20:12:37 +0000 (20:12 +0000)
(gnus-request-article-this-buffer): Make sure the proper decoding is used
if gnus-original-article-buffer happens to be unibyte.

lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el

index 4fd0615e5eb6fc7217a2752ed9ee54f71516ee42..7cfa5358c6386208d81dba96aae9205646afbbf9 100644 (file)
@@ -1,5 +1,10 @@
 2008-04-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * gnus-art.el (gnus-mime-replace-part): Remove unnecessary use of
+       mm-with-multibyte.
+       (gnus-request-article-this-buffer): Make sure the proper decoding is used
+       if gnus-original-article-buffer happens to be unibyte.
+
        * gnus-ems.el (gnus-x-splash): Prefer mm-disable-multibyte to
        default-enable-multibyte-characters.
 
index 55b59488e8eec74707ad61d932b1981441190966..b9f613acaa4f002ed46e8b7310801f3a696f0f39 100644 (file)
@@ -4785,10 +4785,9 @@ and `gnus-mime-delete-part', and not provided at run-time normally."
   ;; Useful if file has already been saved to disk
   (interactive
    (list
-    (mm-with-multibyte
-      (read-file-name "Replace MIME part with file: "
-                     (or mm-default-directory default-directory)
-                     nil nil))))
+    (read-file-name "Replace MIME part with file: "
+                    (or mm-default-directory default-directory)
+                    nil nil)))
   (gnus-mime-save-part-and-strip file))
 
 (defun gnus-mime-save-part-and-strip (&optional file)
@@ -6586,7 +6585,13 @@ If given a prefix, show the hidden text instead."
                 (with-current-buffer gnus-original-article-buffer
                   (and (equal (car gnus-original-article) group)
                        (eq (cdr gnus-original-article) article))))
-           (insert-buffer-substring gnus-original-article-buffer)
+            ;; `insert-buffer-substring' would incorrectly use the
+            ;; equivalent of string-make-multibyte which amount to decoding
+            ;; with locale-coding-system, causing failure of
+            ;; subsequent decoding.
+            (insert (mm-string-to-multibyte
+                     (with-current-buffer gnus-original-article-buffer
+                       (buffer-substring (point-min) (point-max)))))
            'article)
           ;; Check the backlog.
           ((and gnus-keep-backlog