2012-02-09 Lars Ingebrigtsen <larsi@gnus.org>
+ * gnus-msg.el (gnus-msg-mail): Use `message-mail' if Gnus isn't
+ running.
+
* nnimap.el (nnimap-wait-for-response): Minor fixup of message string.
* gnus.el (gnus-server-extend-method): Don't add an -address component
;;;###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
- (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)
+ (if (not (gnus-alive-p))
+ (message-mail)
+ (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)