Commit 9f7c6da9 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(rmail-confirm-expunge): New user-option.

(rmail-expunge): Ask for confirmation depending on the setting
of rmail-confirm-expunge.
parent 02c76af4
......@@ -218,6 +218,15 @@ and the value of the environment variable MAIL overrides it)."
:type 'regexp
:group 'rmail-files)
(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)
(defvar rmail-mode-hook nil
"List of functions to call when Rmail is invoked.")
......@@ -2674,10 +2683,13 @@ Deleted messages stay in the file until the \\[rmail-expunge] command is given."
(defun rmail-expunge ()
"Erase deleted messages from Rmail file and summary buffer."
(if (rmail-summary-exists)
(when (or (null rmail-confirm-expunge)
(funcall rmail-confirm-expunge
"Erase deleted messages from Rmail file? "))
(if (rmail-summary-exists)
;;;; *** Rmail Mailing Commands ***
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment