Merge from emacs--devo--0
[gnus] / lisp / message.el
index 6014493..403cc54 100644 (file)
@@ -442,9 +442,10 @@ nil means let mailer mail back a message to report errors."
   :type 'boolean)
 
 (defcustom message-confirm-send nil
-  "Non-nil means when sending a message ask for y/n confirmation."
+  "When non-nil, ask for confirmation when sending a message."
   :group 'message-sending
   :group 'message-mail
+  :version "23.1" ;; No Gnus
   :link '(custom-manual "(message)Sending Variables")
   :type 'boolean)
 
@@ -5632,7 +5633,8 @@ subscribed address (and not the additional To and Cc header contents)."
                (mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) ""))
                        (mapcar 'downcase
                                (mapcar
-                                'car (mail-header-parse-addresses field))))))
+                                'cadr
+                                (mail-extract-address-components field t))))))
        (setq ace (if (string-match "\\`[[:ascii:]]+\\'" rhs)
                      rhs
                    (downcase (idna-to-ascii rhs))))
@@ -6296,13 +6298,22 @@ are not included."
     (if (gnus-alive-p)
        (setq message-draft-article
              (nndraft-request-associate-buffer "drafts"))
+
+      ;; If Gnus were alive, draft messages would be saved in the drafts folder.
+      ;; But Gnus is not alive, so arrange to save the draft message in a
+      ;; regular file in message-auto-save-directory.  Append a unique
+      ;; time-based suffix to the filename to allow multiple drafts to be saved
+      ;; simultaneously without overwriting each other (which mimics the
+      ;; functionality of the Gnus drafts folder).
       (setq buffer-file-name (expand-file-name
+                             (concat
                              (if (memq system-type
                                        '(ms-dos ms-windows windows-nt
                                                 cygwin cygwin32 win32 w32
                                                 mswindows))
                                  "message"
                                "*message*")
+                              (format-time-string "-%Y%m%d-%H%M%S"))
                              message-auto-save-directory))
       (setq buffer-auto-save-file-name (make-auto-save-file-name)))
     (clear-visited-file-modtime)