# HG changeset patch # User Gerd Moellmann # Date 953899978 0 # Node ID 4aafdd90bf08918e80343bb7400c10aa3e1e2922 # Parent 4b9d76092b0f2574b1cf01893a2fa8e9afe4ce62 (rmail-confirm-expunge): New user-option. (rmail-expunge): Ask for confirmation depending on the setting of rmail-confirm-expunge. diff -r 4b9d76092b0f -r 4aafdd90bf08 lisp/mail/rmail.el --- a/lisp/mail/rmail.el Thu Mar 23 21:20:46 2000 +0000 +++ b/lisp/mail/rmail.el Fri Mar 24 12:12:58 2000 +0000 @@ -219,6 +219,15 @@ :group 'rmail-files) ;;;###autoload +(defcustom rmail-confirm-expunge 'yes-or-no-p + "*Whether and how to ask for confirmation before expunging deleted messages." + :type '(choice (const :tag "No confirmation" nil) + (const :tag "Confirm with y-or-n-p" y-or-n-p) + (const :tag "Confirm with yes-or-no-p" yes-or-no-p)) + :version "21.1" + :group 'rmail-files) + +;;;###autoload (defvar rmail-mode-hook nil "List of functions to call when Rmail is invoked.") @@ -2674,10 +2683,13 @@ (defun rmail-expunge () "Erase deleted messages from Rmail file and summary buffer." (interactive) - (rmail-only-expunge) - (if (rmail-summary-exists) - (rmail-select-summary - (rmail-update-summary)))) + (when (or (null rmail-confirm-expunge) + (funcall rmail-confirm-expunge + "Erase deleted messages from Rmail file? ")) + (rmail-only-expunge) + (if (rmail-summary-exists) + (rmail-select-summary + (rmail-update-summary))))) ;;;; *** Rmail Mailing Commands ***