[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog mail/sendmail.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog mail/sendmail.el |
Date: |
Thu, 09 Apr 2009 16:33:47 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Richard M. Stallman <rms> 09/04/09 16:33:46
Modified files:
lisp : ChangeLog
lisp/mail : sendmail.el
Log message:
* mail/sendmail.el (sendmail-send-it): Replace any
pre-existing Content-type header if we insert one.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15565&r2=1.15566
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/sendmail.el?cvsroot=emacs&r1=1.326&r2=1.327
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15565
retrieving revision 1.15566
diff -u -b -r1.15565 -r1.15566
--- ChangeLog 9 Apr 2009 13:46:27 -0000 1.15565
+++ ChangeLog 9 Apr 2009 16:33:41 -0000 1.15566
@@ -1,3 +1,8 @@
+2009-04-09 Richard M Stallman <address@hidden>
+
+ * mail/sendmail.el (sendmail-send-it): Replace any
+ pre-existing Content-type header if we insert one.
+
2009-04-09 Michael Albinus <address@hidden>
* net/tramp.el (tramp-file-name-handler-alist): Add
Index: mail/sendmail.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mail/sendmail.el,v
retrieving revision 1.326
retrieving revision 1.327
diff -u -b -r1.326 -r1.327
--- mail/sendmail.el 15 Mar 2009 21:07:39 -0000 1.326
+++ mail/sendmail.el 9 Apr 2009 16:33:45 -0000 1.327
@@ -1113,7 +1113,10 @@
(if (not (re-search-forward "^From:" delimline t))
(mail-insert-from-field))
;; Possibly add a MIME header for the current coding system
- (let (charset)
+ (let (charset where-content-type)
+ (goto-char (point-min))
+ (setq where-content-type
+ (re-search-forward "^Content-type:" delimline t))
(goto-char (point-min))
(and (eq mail-send-nonascii 'mime)
(not (re-search-forward "^MIME-version:" delimline t))
@@ -1122,11 +1125,19 @@
selected-coding
(setq charset
(coding-system-get selected-coding :mime-charset))
+ (progn
(goto-char delimline)
(insert "MIME-version: 1.0\n"
"Content-type: text/plain; charset="
(symbol-name charset)
- "\nContent-Transfer-Encoding: 8bit\n")))
+ "\nContent-Transfer-Encoding: 8bit\n")
+ ;; The character set we will actually use
+ ;; should override any specified in the message itself.
+ (when where-content-type
+ (goto-char where-content-type)
+ (beginning-of-line)
+ (delete-region (point)
+ (progn (forward-line 1) (point)))))))
;; Insert an extra newline if we need it to work around
;; Sun's bug that swallows newlines.
(goto-char (1+ delimline))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp ChangeLog mail/sendmail.el,
Richard M. Stallman <=