aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mail
diff options
context:
space:
mode:
authorKenichi Handa <[email protected]>2011-02-22 09:22:09 +0900
committerKenichi Handa <[email protected]>2011-02-22 09:22:09 +0900
commit2e15a2cf4ddfbda0bbf972036c11d464f7ba6226 (patch)
tree98bb8620d5f3b2cf8637bf1ae747330fcd02f7fa /lisp/mail
parent1f459fa46cbd419bc55f8be03bce617d96af4da5 (diff)
parent47301027bbbbd1babcfedf1ef38b2c776b33c462 (diff)
merge emacs-23
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/rmail.el2
-rw-r--r--lisp/mail/rmailmm.el16
2 files changed, 12 insertions, 6 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 94f5ce4505..5e9baed1c2 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4297,7 +4297,7 @@ With prefix argument N moves forward N messages with these labels.
;;;***
-;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "7f6ad821b4543a18139fee9250beea5c")
+;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "9c0902449733cabd5c7e7d17092a7c69")
;;; Generated autoloads from rmailmm.el
(autoload 'rmail-mime "rmailmm" "\
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index d6af925d46..e44dd877e4 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -471,10 +471,11 @@ See `rmail-mime-entity' for the detail."
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 @@ HEADER is a header component of a MIME-entity object (see
((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 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'."
(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