diff options
| author | Gerd Moellmann | 2000-03-24 12:12:58 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-03-24 12:12:58 +0000 |
| commit | 9f7c6da9c5bfd16c1b52a25c39731edb13fecf6c (patch) | |
| tree | 639cc5f480fe52f2eef48103dcdc22f2fc5b8b0b | |
| parent | 02c76af4163f44214a0894cb1c7995adac39261d (diff) | |
| download | emacs-9f7c6da9c5bfd16c1b52a25c39731edb13fecf6c.tar.gz emacs-9f7c6da9c5bfd16c1b52a25c39731edb13fecf6c.zip | |
(rmail-confirm-expunge): New user-option.
(rmail-expunge): Ask for confirmation depending on the setting
of rmail-confirm-expunge.
| -rw-r--r-- | lisp/mail/rmail.el | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 1586f37b000..1aab4a4b4b2 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -219,6 +219,15 @@ and the value of the environment variable MAIL overrides it)." | |||
| 219 | :group 'rmail-files) | 219 | :group 'rmail-files) |
| 220 | 220 | ||
| 221 | ;;;###autoload | 221 | ;;;###autoload |
| 222 | (defcustom rmail-confirm-expunge 'yes-or-no-p | ||
| 223 | "*Whether and how to ask for confirmation before expunging deleted messages." | ||
| 224 | :type '(choice (const :tag "No confirmation" nil) | ||
| 225 | (const :tag "Confirm with y-or-n-p" y-or-n-p) | ||
| 226 | (const :tag "Confirm with yes-or-no-p" yes-or-no-p)) | ||
| 227 | :version "21.1" | ||
| 228 | :group 'rmail-files) | ||
| 229 | |||
| 230 | ;;;###autoload | ||
| 222 | (defvar rmail-mode-hook nil | 231 | (defvar rmail-mode-hook nil |
| 223 | "List of functions to call when Rmail is invoked.") | 232 | "List of functions to call when Rmail is invoked.") |
| 224 | 233 | ||
| @@ -2674,10 +2683,13 @@ Deleted messages stay in the file until the \\[rmail-expunge] command is given." | |||
| 2674 | (defun rmail-expunge () | 2683 | (defun rmail-expunge () |
| 2675 | "Erase deleted messages from Rmail file and summary buffer." | 2684 | "Erase deleted messages from Rmail file and summary buffer." |
| 2676 | (interactive) | 2685 | (interactive) |
| 2677 | (rmail-only-expunge) | 2686 | (when (or (null rmail-confirm-expunge) |
| 2678 | (if (rmail-summary-exists) | 2687 | (funcall rmail-confirm-expunge |
| 2679 | (rmail-select-summary | 2688 | "Erase deleted messages from Rmail file? ")) |
| 2680 | (rmail-update-summary)))) | 2689 | (rmail-only-expunge) |
| 2690 | (if (rmail-summary-exists) | ||
| 2691 | (rmail-select-summary | ||
| 2692 | (rmail-update-summary))))) | ||
| 2681 | 2693 | ||
| 2682 | ;;;; *** Rmail Mailing Commands *** | 2694 | ;;;; *** Rmail Mailing Commands *** |
| 2683 | 2695 | ||