2001-11-17 Simon Josefsson <jas@extundo.com>
authorSimon Josefsson <jas@extundo.com>
Sat, 17 Nov 2001 11:26:25 +0000 (11:26 +0000)
committerSimon Josefsson <jas@extundo.com>
Sat, 17 Nov 2001 11:26:25 +0000 (11:26 +0000)
* message.el (message-send): Ask user if Fcc/Gcc should be
performed when no other sender was specified.
Suggested by prj@po.cwru.edu (Paul Jarc).

lisp/ChangeLog
lisp/message.el

index 2bc170c..a4eec60 100644 (file)
@@ -1,3 +1,9 @@
+2001-11-17  Simon Josefsson  <jas@extundo.com>
+
+       * message.el (message-send): Ask user if Fcc/Gcc should be
+       performed when no other sender was specified.
+       Suggested by prj@po.cwru.edu (Paul Jarc).
+
 2001-11-17  Simon Josefsson  <jas@extundo.com>
 
        * message.el (message-mode, message-mode-map): Use C-c C-u for
index 6e89e2b..a72f03c 100644 (file)
@@ -2499,7 +2499,7 @@ It should typically alter the sending method in some way or other."
   (message message-sending-message)
   (let ((alist message-send-method-alist)
        (success t)
-       elem sent
+       elem sent dont-barf-on-no-method
        (message-options message-options))
     (message-options-set-recipient)
     (while (and success
@@ -2516,9 +2516,19 @@ It should typically alter the sending method in some way or other."
                         (error "Denied posting -- multiple copies")))
                   (setq success (funcall (caddr elem) arg)))
          (setq sent t))))
-    (unless (or sent (not success))
+    (unless (or sent (not success)
+               (let ((fcc (message-fetch-field "Fcc"))
+                     (gcc (message-fetch-field "Gcc")))
+                 (and (or fcc gcc)
+                      (setq dont-barf-on-no-method 
+                            (gnus-y-or-n-p
+                             (format "No receiver, perform %s anyway? "
+                                     (cond ((and fcc gcc) "Fcc and Gcc")
+                                           (fcc "Fcc")
+                                           (t "Gcc"))))))))
       (error "No methods specified to send by"))
-    (when (and success sent)
+    (when (or dont-barf-on-no-method
+             (and success sent))
       (message-do-fcc)
       (save-excursion
        (run-hooks 'message-sent-hook))