Use select-message-coding-system in mh-comp

* lisp/mh-e/mh-comp.el (mh-send-letter):
Use select-message-coding-system.  (Bug#30060)
This commit is contained in:
Glenn Morris 2018-03-01 13:07:42 -05:00
parent 8643de540e
commit 02a71e6c2f

View file

@ -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