From: yamaoka Date: Wed, 6 Oct 1999 22:43:50 +0000 (+0000) Subject: (message-generate-headers): Don't insert excessive newline. X-Git-Tag: t-gnus-6_13_2-04~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d061f447477399f5b6ac9a62f077fe9db39ccdff;p=elisp%2Fgnus.git- (message-generate-headers): Don't insert excessive newline. --- 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 "[^:]+: "))