X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-msg.el;h=9411f465d2f5f4adcdfe213d207fc0e7f0ccc2ff;hb=afbf528d6fb2fdb90f56a50212e46178b869a28b;hp=aa4ed4b3286bc5b69a9e53644f0dfd742c951301;hpb=86089ad3ebb9713c72ac8a8993d2c3915713d813;p=gnus diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index aa4ed4b32..9411f465d 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -494,22 +494,28 @@ Thank you for your help in stamping out bugs. ;;;###autoload (defun gnus-msg-mail (&optional to subject other-headers continue - switch-action yank-action send-actions return-action) + switch-action yank-action send-actions + return-action) "Start editing a mail message to be sent. Like `message-mail', but with Gnus paraphernalia, particularly the -Gcc: header for archiving purposes." +Gcc: header for archiving purposes. +If Gnus isn't running, a plain `message-mail' setup is used +instead." (interactive) - (let ((buf (current-buffer)) - mail-buf) - (gnus-setup-message 'message + (if (not (gnus-alive-p)) (message-mail to subject other-headers continue - nil yank-action send-actions return-action)) - (when switch-action - (setq mail-buf (current-buffer)) - (switch-to-buffer buf) - (apply switch-action mail-buf nil))) - ;; COMPOSEFUNC should return t if succeed. Undocumented ??? - t) + nil yank-action send-actions return-action) + (let ((buf (current-buffer)) + mail-buf) + (gnus-setup-message 'message + (message-mail to subject other-headers continue + nil yank-action send-actions return-action)) + (when switch-action + (setq mail-buf (current-buffer)) + (switch-to-buffer buf) + (apply switch-action mail-buf nil)) + ;; COMPOSEFUNC should return t if succeed. Undocumented ??? + t))) ;;;###autoload (defun gnus-button-mailto (address) @@ -652,7 +658,7 @@ a news." (if (= 1 (prefix-numeric-value arg)) (gnus-group-completing-read "Newsgroup" nil (gnus-read-active-file-p)) - (gnus-group-group-name)) + (or (gnus-group-group-name) "")) "")) ;; make sure last viewed article doesn't affect posting styles: (gnus-article-copy)) @@ -1295,7 +1301,7 @@ For the \"inline\" alternatives, also see the variable (message-remove-header "gcc") (when gcc (goto-char (point-max)) - (cond ((eq gnus-gcc-self-resent-messages 'none)) + (cond ((eq gnus-gcc-self-resent-messages 'none)) ((eq gnus-gcc-self-resent-messages t) (insert "Gcc: \"" gnus-newsgroup-name "\"\n")) ((stringp gnus-gcc-self-resent-messages) @@ -1332,8 +1338,9 @@ For the \"inline\" alternatives, also see the variable current-prefix-arg)) (let ((message-header-setup-hook (copy-sequence message-header-setup-hook)) (message-sent-hook (copy-sequence message-sent-hook))) + ;; `gnus-summary-resend-message-insert-gcc' must run last. (add-hook 'message-header-setup-hook - 'gnus-summary-resend-message-insert-gcc) + 'gnus-summary-resend-message-insert-gcc t) (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc 'gnus-inews-do-gcc))