emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/prop-search e1a0cbb: Make mail-sendmail-undelimit-


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] scratch/prop-search e1a0cbb: Make mail-sendmail-undelimit-header actually remove the delimiter
Date: Mon, 16 Apr 2018 13:42:02 -0400 (EDT)

branch: scratch/prop-search
commit e1a0cbbcf8389c76f67048e69139b5b0adf2cf38
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Make mail-sendmail-undelimit-header actually remove the delimiter
    
    * lisp/mail/sendmail.el (mail-sendmail-undelimit-header): Actually
    remove the mail header separator (bug#17488).  In all the cases
    where this is called, the separator will probably already have
    been removed, so the only thing this does is place point at the
    end of the headers.
---
 lisp/mail/sendmail.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index c9f8fec..ab6ac4b 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -784,8 +784,10 @@ Concretely: replace the first blank line in the header 
with the separator."
 (defun mail-sendmail-undelimit-header ()
   "Remove header separator to put the message in correct form for sendmail.
 Leave point at the start of the delimiter line."
-  (rfc822-goto-eoh)
-  (delete-region (point) (progn (end-of-line) (point))))
+  (goto-char (point-min))
+  (when (re-search-forward (concat "^" (regexp-quote mail-header-separator) 
"\n"))
+    (replace-match "\n"))
+  (rfc822-goto-eoh))
 
 (defun mail-mode-auto-fill ()
   "Carry out Auto Fill for Mail mode.



reply via email to

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