Mercurial > hg > xemacs-beta
diff lisp/gnus/message.el @ 122:d2f30a177268 r20-1b14
Import from CVS: tag r20-1b14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:26:03 +0200 |
parents | cca96a509cfe |
children | 9b50b4588a93 |
line wrap: on
line diff
--- a/lisp/gnus/message.el Mon Aug 13 09:25:31 2007 +0200 +++ b/lisp/gnus/message.el Mon Aug 13 09:26:03 2007 +0200 @@ -1330,7 +1330,7 @@ (defun message-insert-to () "Insert a To header that points to the author of the article being replied to." (interactive) - (let ((co (message-fetch-field "mail-copies-to"))) + (let ((co (message-fetch-reply-field "mail-copies-to"))) (when (and co (equal (downcase co) "never")) (error "The user has requested not to have copies sent via mail"))) @@ -1515,14 +1515,20 @@ (let ((start (point))) ;; Remove unwanted headers. (when message-ignored-cited-headers - (save-restriction - (narrow-to-region - (goto-char start) - (if (search-forward "\n\n" nil t) - (1- (point)) - (point))) - (message-remove-header message-ignored-cited-headers t) - (goto-char (point-max)))) + (let (all-removed) + (save-restriction + (narrow-to-region + (goto-char start) + (if (search-forward "\n\n" nil t) + (1- (point)) + (point))) + (message-remove-header message-ignored-cited-headers t) + (when (= (point-min) (point-max)) + (setq all-removed t)) + (goto-char (point-max))) + (if all-removed + (goto-char start) + (forward-line 1)))) ;; Delete blank lines at the start of the buffer. (while (and (point-min) (eolp)