Mercurial > emacs
changeset 64672:85e3f1fbc585
(select-message-coding-system): Be
sure to use LF for end-of-line. If no coding system is decided,
return iso-8859-1-unix.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 29 Jul 2005 01:44:52 +0000 |
parents | 89073e52939c |
children | 9a6cb62f5184 |
files | lisp/international/mule-cmds.el |
diffstat | 1 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el Fri Jul 29 01:44:40 2005 +0000 +++ b/lisp/international/mule-cmds.el Fri Jul 29 01:44:52 2005 +0000 @@ -1027,10 +1027,19 @@ ;; 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.