emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 02a71e6 1/4: Use select-message-coding-system in mh


From: Glenn Morris
Subject: [Emacs-diffs] master 02a71e6 1/4: Use select-message-coding-system in mh-comp
Date: Thu, 1 Mar 2018 13:16:26 -0500 (EST)

branch: master
commit 02a71e6c2f2e0e17756ef4d040453d96637d76c7
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Use select-message-coding-system in mh-comp
    
    * lisp/mh-e/mh-comp.el (mh-send-letter):
    Use select-message-coding-system.  (Bug#30060)
---
 lisp/mh-e/mh-comp.el | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index a9f809c..cfdd2ae 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -305,17 +305,19 @@ message and scan line."
         (file-name buffer-file-name)
         (config mh-previous-window-config)
         (coding-system-for-write
-         (if (and (local-variable-p 'buffer-file-coding-system
-                                    (current-buffer)) ;XEmacs needs two args
-                  ;; We're not sure why, but buffer-file-coding-system
-                  ;; tends to get set to undecided-unix.
-                  (not (memq buffer-file-coding-system
-                             '(undecided undecided-unix undecided-dos))))
-             buffer-file-coding-system
-           (or (and (boundp 'sendmail-coding-system) sendmail-coding-system)
-               (and (default-boundp 'buffer-file-coding-system)
-                    (default-value 'buffer-file-coding-system))
-               'iso-latin-1))))
+         (if (fboundp 'select-message-coding-system)
+             (select-message-coding-system) ; Emacs has this since at least 
21.1
+           (if (and (local-variable-p 'buffer-file-coding-system
+                                      (current-buffer)) ;XEmacs needs two args
+                    ;; We're not sure why, but buffer-file-coding-system
+                    ;; tends to get set to undecided-unix.
+                    (not (memq buffer-file-coding-system
+                               '(undecided undecided-unix undecided-dos))))
+               buffer-file-coding-system
+             (or (and (boundp 'sendmail-coding-system) sendmail-coding-system)
+                 (and (default-boundp 'buffer-file-coding-system)
+                      (default-value 'buffer-file-coding-system))
+                 'iso-latin-1)))))
     ;; Older versions of spost do not support -msgid and -mime.
     (unless mh-send-uses-spost-flag
       ;; Adding a Message-ID field looks good, makes it easier to search for



reply via email to

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