emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100489: Fix setting of buffer-fil


From: Kenichi Handa
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100489: Fix setting of buffer-file-coding-system for MIME message.
Date: Sat, 19 Feb 2011 19:47:21 +0900
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100489 [merge]
committer: Kenichi Handa <address@hidden>
branch nick: emacs-23
timestamp: Sat 2011-02-19 19:47:21 +0900
message:
  Fix setting of buffer-file-coding-system for MIME message.
modified:
  lisp/ChangeLog
  lisp/mail/rmail.el
  lisp/mail/rmailmm.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-02-18 17:51:15 +0000
+++ b/lisp/ChangeLog    2011-02-19 09:22:24 +0000
@@ -1,3 +1,11 @@
+2011-02-19  Kenichi Handa  <address@hidden>
+
+       * mail/rmailmm.el (rmail-mime-find-header-encoding): Be sure to
+       get the header copy into the temporary buffer.
+       (rmail-mime-insert-decoded-text): Ignore us-ascii.
+       (rmail-show-mime): When rmail-mime-coding-system is nil, set
+       buffer-file-coding-system to undecided.
+
 2011-02-18  Eli Zaretskii  <address@hidden>
 
        * image-mode.el (image-toggle-display-image): Disable

=== modified file 'lisp/mail/rmail.el'
--- a/lisp/mail/rmail.el        2011-01-15 03:50:47 +0000
+++ b/lisp/mail/rmail.el        2011-02-19 09:22:24 +0000
@@ -4287,7 +4287,7 @@
 
 ;;;***
 
-;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" 
"7f6ad821b4543a18139fee9250beea5c")
+;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" 
"9c0902449733cabd5c7e7d17092a7c69")
 ;;; Generated autoloads from rmailmm.el
 
 (autoload 'rmail-mime "rmailmm" "\

=== modified file 'lisp/mail/rmailmm.el'
--- a/lisp/mail/rmailmm.el      2011-01-14 04:04:10 +0000
+++ b/lisp/mail/rmailmm.el      2011-02-19 09:22:24 +0000
@@ -471,10 +471,11 @@
 HEADER is a header component of a MIME-entity object (see
 `rmail-mime-entity')."
   (with-temp-buffer
-    (let ((last-coding-system-used nil))
+    (let ((buf (current-buffer)))
       (with-current-buffer rmail-mime-mbox-buffer
-       (let ((rmail-buffer rmail-mime-mbox-buffer)
-             (rmail-view-buffer rmail-mime-view-buffer))
+       (let ((last-coding-system-used nil)
+             (rmail-buffer rmail-mime-mbox-buffer)
+             (rmail-view-buffer buf))
          (save-excursion
            (goto-char (aref header 0))
            (rmail-copy-headers (point) (aref header 1)))))
@@ -513,7 +514,9 @@
              ((string= transfer-encoding "quoted-printable")
               (quoted-printable-decode-region pos (point))))))
     (decode-coding-region pos (point) coding-system)
-    (if (or (not rmail-mime-coding-system) (consp rmail-mime-coding-system))
+    (if (and
+        (or (not rmail-mime-coding-system) (consp rmail-mime-coding-system))
+        (not (eq (coding-system-base coding-system) 'us-ascii)))
        (setq rmail-mime-coding-system coding-system))
     (or (bolp) (insert "\n"))))
 
@@ -1301,7 +1304,10 @@
                      (rmail-mime-find-header-encoding
                       (rmail-mime-entity-header entity)))))
          (set-buffer-file-coding-system
-          (coding-system-base rmail-mime-coding-system) t t))
+          (if rmail-mime-coding-system
+              (coding-system-base rmail-mime-coding-system)
+            'undecided)
+          t t))
       ;; Decoding failed.  ENTITY is an error message.  Insert the
       ;; original message body as is, and show warning.
       (let ((region (with-current-buffer rmail-mime-mbox-buffer


reply via email to

[Prev in Thread] Current Thread [Next in Thread]