+2012-04-30 Eli Zaretskii <eliz@gnu.org>
+
+ * mail/rmail.el (rmail-yank-current-message): Use the encoding of
+ the yanked message in preference to the default value of
+ buffer-file-coding-system.
+
2012-04-30 Martin Rudalics <rudalics@gmx.at>
* window.el (display-buffer--action-function-custom-type): Fix
(with-current-buffer buffer
(unless (rmail-buffers-swapped-p)
(setq buffer rmail-view-buffer)))
- (insert-buffer buffer))
-
+ (insert-buffer buffer)
+ ;; If they yank the text of BUFFER, the encoding of BUFFER is a
+ ;; better default for the reply message than the default value of
+ ;; buffer-file-coding-system.
+ (and (coding-system-equal (default-value 'buffer-file-coding-system)
+ buffer-file-coding-system)
+ (setq buffer-file-coding-system
+ (coding-system-change-text-conversion
+ buffer-file-coding-system (coding-system-base
+ (with-current-buffer buffer
+ buffer-file-coding-system))))))
(defun rmail-start-mail (&optional noerase to subject in-reply-to cc
replybuffer sendactions same-window