From d061f447477399f5b6ac9a62f077fe9db39ccdff Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 6 Oct 1999 22:43:50 +0000 Subject: [PATCH] (message-generate-headers): Don't insert excessive newline. --- lisp/message.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/message.el b/lisp/message.el index f625e56..e112a03 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -3607,12 +3607,16 @@ Headers already prepared in the buffer are not modified." ;; This header didn't exist, so we insert it. (goto-char (point-max)) (insert (if (stringp header) header (symbol-name header)) - ": " value "\n") + ": " value) + (unless (bolp) + (insert "\n")) (forward-line -1)) ;; The value of this header was empty, so we clear ;; totally and insert the new value. (delete-region (point) (gnus-point-at-eol)) - (insert value)) + (insert value) + (when (bolp) + (delete-char -1))) ;; Add the deletable property to the headers that require it. (and (memq header message-deletable-headers) (progn (beginning-of-line) (looking-at "[^:]+: ")) -- 1.7.10.4