File U_rev-1313.patch of Package emacs-vm

------------------------------------------------------------
revno: 1313
fixes bugs: https://launchpad.net/bugs/793541 https://launchpad.net/bugs/907286
committer: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>
branch nick: trunk
timestamp: Thu 2011-12-29 19:19:09 +0000
message:
  - Added a variable `vm-confirm-for-auto-archive' that controls the
  confirmation dialogue for `vm-auto-archive-messages'.  (Bug 793541)
  - Add autoload for `vm-select-recipient-from-sender'.  (Bug 907286)
diff:
=== modified file 'info/vm.texinfo'
--- info/vm.texinfo	2011-12-26 17:40:02 +0000
+++ info/vm.texinfo	2011-12-29 19:19:09 +0000
@@ -3487,10 +3487,15 @@
 does.  Messages saved this way are flagged ``written''.
 @findex vm-auto-archive-messages
 @kindex A
+@vindex vm-confirm-for-auto-archive
 @item A (@code{vm-auto-archive-messages})
 Save all unfiled messages that auto-match a folder via
 @code{vm-auto-folder-alist} to their appropriate folders.  Messages that
-are flagged for deletion are not saved by this command.  If invoked with a
+are flagged for deletion are not saved by this command.  This command asks
+for confirmation before archiving because it is a wholesale operation that
+cannot be easy reversed.  (Set @code{vm-confirm-for-auto-archive} to
+@code{nil} to override the confirmation dialogue.)  If the command is
+invoked with a 
 prefix argument, confirmation will be requested for each save.
 @findex vm-pipe-message-to-command
 @kindex ||

=== modified file 'lisp/vm-reply.el'
--- lisp/vm-reply.el	2011-12-26 09:50:31 +0000
+++ lisp/vm-reply.el	2011-12-29 19:19:09 +0000
@@ -1643,6 +1643,7 @@
   (add-hook 'vm-mail-send-hook 'vm-forget-composition-buffer nil t)
   (vm-update-ml-composition-buffer-count))
 
+;;;###autoload
 (defun vm-select-recipient-from-sender ()
   "Select a recipient's address from the current message's sender, if
 there is a current message."

=== modified file 'lisp/vm-save.el'
--- lisp/vm-save.el	2011-12-26 15:46:17 +0000
+++ lisp/vm-save.el	2011-12-29 19:19:09 +0000
@@ -105,6 +105,10 @@
 `vm-auto-folder-alist' to their appropriate folders.  Messages that
 are flagged for deletion are not saved.
 
+This command asks for confirmation before proceeding.  Set
+`vm-confirm-for-auto-archive' to nil to turn off the confirmation
+dialogue. 
+
 Prefix arg means to ask user for confirmation before saving each message.
 
 When invoked on marked messages (via `vm-next-command-uses-marks'),

=== modified file 'lisp/vm-vars.el'
--- lisp/vm-vars.el	2011-12-27 14:56:42 +0000
+++ lisp/vm-vars.el	2011-12-29 19:19:09 +0000
@@ -2983,7 +2983,7 @@
 sent is a resent message (i.e. has a Resent- recipient header)
 then the Resent-Date header will be removed/inserted instead.
 
-This is useful if you set mail-archive-file-name,
+This is useful if you set `mail-archive-file-name',
 because your archived message will contain a Date header.
 
 A nil value means don't insert a Date header."
@@ -2997,7 +2997,7 @@
 sent is a resent message (i.e. has a Resent- recipient header) a
 Resent-Message-ID header will be removed/inserted instead.
 
-This is useful if you set mail-archive-file-name, because your
+This is useful if you set `mail-archive-file-name', because your
 archived messages will contain a Message-ID header, which may be
 useful later for threading messages.
 
@@ -4606,7 +4606,7 @@
   :type 'boolean)
 
 (defcustom vm-delete-after-archiving nil
-  "*Non-nil value causes VM automatically to mark messages for deletion
+  "*Non-nil value causes VM to automatically mark messages for deletion
 after successfully auto-archiving them with the `vm-auto-archive-messages'
 command."
   :group 'vm-dispose
@@ -4618,6 +4618,12 @@
   :group 'vm-dispose
   :type 'boolean)
 
+(defcustom vm-confirm-for-auto-archive t
+  "*Non-nil value causes VM to ask for confirmation when
+`vm-auto-archive-messages' is invoked."
+  :group 'vm-dispose
+  :type 'boolean)
+
 (defcustom vm-circular-folders nil
   "*Value determines whether VM folders will be considered circular by
 various commands.  `Circular' means VM will wrap from the end of the folder