+2002-01-08 Simon Josefsson <jas@extundo.com>
+
+ * mml.el (mml-generate-mime-1): Set recipient correctly.
+
2002-01-08 ShengHuo ZHU <zsh@cs.rochester.edu>
+ * message.el (message-read-from-minibuffer): Add argument
+ initial-contents.
+ * gnus-msg.el (gnus-summary-resend-message): Use it.
+
* gnus-group.el (gnus-group-read-ephemeral-group): Restore the old
behavior of quit-config.
(defun gnus-summary-resend-message (address n)
"Resend the current article to ADDRESS."
(interactive
- (list (message-read-from-minibuffer "Resend message(s) to: ")
+ (list (message-read-from-minibuffer
+ "Resend message(s) to: "
+ (when (gnus-buffer-live-p gnus-original-article-buffer)
+ ;; If some other article is currently selected, the
+ ;; initial-contents is wrong. Whatever, it is just the
+ ;; initial-contents.
+ (with-current-buffer gnus-original-article-buffer
+ (nnmail-fetch-field "to"))))
current-prefix-arg))
(let ((articles (gnus-summary-work-articles n))
article)
(forward-line 1)
(insert "Content-Type: text/plain; charset=us-ascii\n"))))))
-(defun message-read-from-minibuffer (prompt)
+(defun message-read-from-minibuffer (prompt &optional initial-contents)
"Read from the minibuffer while providing abbrev expansion."
(if (fboundp 'mail-abbrevs-setup)
(let ((mail-abbrev-mode-regexp "")
(minibuffer-setup-hook 'mail-abbrevs-setup)
(minibuffer-local-map message-minibuffer-local-map))
- (read-from-minibuffer prompt))
+ (read-from-minibuffer prompt initial-contents))
(let ((minibuffer-setup-hook 'mail-abbrev-minibuffer-setup-hook)
(minibuffer-local-map message-minibuffer-local-map))
- (read-string prompt))))
+ (read-string prompt initial-contents))))
(defun message-use-alternative-email-as-from ()
(require 'mail-utils)
(if (setq sender (cdr (assq 'sender cont)))
(message-options-set 'message-sender sender))
(if (setq recipients (cdr (assq 'recipients cont)))
- (message-options-set 'message-sender recipients))
+ (message-options-set 'message-recipients recipients))
(funcall (nth 1 item) cont)))
(let ((item (assoc (cdr (assq 'encrypt cont)) mml-encrypt-alist))
sender recipients)
(if (setq sender (cdr (assq 'sender cont)))
(message-options-set 'message-sender sender))
(if (setq recipients (cdr (assq 'recipients cont)))
- (message-options-set 'message-sender recipients))
+ (message-options-set 'message-recipients recipients))
(funcall (nth 1 item) cont))))))
(defun mml-compute-boundary (cont)