diff options
author | Kenichi Handa <handa@m17n.org> | 2005-07-29 01:44:52 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2005-07-29 01:44:52 +0000 |
commit | 661635c2dcf69d2d67bd7bb976f3a698c11af5cd (patch) | |
tree | dce6fbd88a6f644cb7c40a4b63e186f4148412f2 /lisp/international | |
parent | d44e3b453c528446579182d82284abbfd80f8b7d (diff) | |
download | emacs-661635c2dcf69d2d67bd7bb976f3a698c11af5cd.tar.gz |
(select-message-coding-system): Be
sure to use LF for end-of-line. If no coding system is decided,
return iso-8859-1-unix.
Diffstat (limited to 'lisp/international')
-rw-r--r-- | lisp/international/mule-cmds.el | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 077a196f474..acd53732140 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1027,10 +1027,19 @@ it asks the user to select a proper coding system." ;; We should never use no-conversion for outgoing mail. (setq coding nil)) (if (fboundp select-safe-coding-system-function) - (funcall select-safe-coding-system-function - (point-min) (point-max) coding - (function (lambda (x) (coding-system-get x 'mime-charset)))) - coding))) + (setq coding + (funcall select-safe-coding-system-function + (point-min) (point-max) coding + (function (lambda (x) + (coding-system-get x 'mime-charset)))))) + (if coding + ;; Be sure to use LF for end-of-line. + (setq coding (coding-system-change-eol-conversion coding 'unix)) + ;; No coding system is decided. Usually this is the case that + ;; the current buffer contains only ASCII. So, we hope + ;; iso-8859-1 works. + (setq coding 'iso-8859-1-unix)) + coding)) ;;; Language support stuff. |