emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107927: Resurrect encoding of rep


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r107927: Resurrect encoding of replies by Rmail which was lost in revision 107875.
Date: Mon, 30 Apr 2012 15:50:12 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107927
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Mon 2012-04-30 15:50:12 +0300
message:
  Resurrect encoding of replies by Rmail which was lost in revision 107875.
  
   lisp/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.
modified:
  lisp/ChangeLog
  lisp/mail/rmail.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-04-30 09:09:26 +0000
+++ b/lisp/ChangeLog    2012-04-30 12:50:12 +0000
@@ -1,3 +1,9 @@
+2012-04-30  Eli Zaretskii  <address@hidden>
+
+       * 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  <address@hidden>
 
        * window.el (display-buffer--action-function-custom-type): Fix

=== modified file 'lisp/mail/rmail.el'
--- a/lisp/mail/rmail.el        2012-04-20 19:17:59 +0000
+++ b/lisp/mail/rmail.el        2012-04-30 12:50:12 +0000
@@ -3567,8 +3567,17 @@
   (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


reply via email to

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