Generalize imail-expunge-confirmation to make the type of prompt and
authorChris Hanson <org/chris-hanson/cph>
Thu, 25 May 2000 22:16:53 +0000 (22:16 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 25 May 2000 22:16:53 +0000 (22:16 +0000)
the showing of message independently selectable.

v7/src/imail/imail-top.scm
v7/src/imail/todo.txt

index fcf079280891d09eaadd7c184a1e1d5a3ac2116e..69f15dafbd2bfef8d41001d6dc33f507e47aed4f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: imail-top.scm,v 1.109 2000/05/25 05:17:35 cph Exp $
+;;; $Id: imail-top.scm,v 1.110 2000/05/25 22:16:42 cph Exp $
 ;;;
 ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
 ;;;
@@ -68,13 +68,13 @@ The procedure is called with one argument, a list of headers,
 
 (define-variable imail-expunge-confirmation
   "Control what kind of confirmation is required for expunging messages.
-The following symbols are permissible values:
-NONE           no confirmation
-BRIEF          `y' or `n'
-VERBOSE                `yes' or `no'
-COMPLETE       `yes' or `no', showing messages to be expunged"
-  'COMPLETE
-  (lambda (object) (memq object '(NONE BRIEF VERBOSE COMPLETE))))
+This variable's value is a list of symbols, as follows:
+BRIEF          Use \"y or n\"-style confirmation.
+VERBOSE                Use \"yes or no\"-style confirmation.
+SHOW-MESSAGES  Pop up window with messages to be expunged."
+  '(VERBOSE SHOW-MESSAGES)
+  (lambda (x)
+    (list-of-type? x (lambda (x) (memq x '(BRIEF VERBOSE SHOW-MESSAGES))))))
 
 (define-variable imail-reply-with-re
   "True means prepend subject with Re: in replies."
@@ -1037,22 +1037,24 @@ With prefix argument N, undeletes backward N messages,
        (cond ((= n 0)
               (message "No messages to expunge"))
              ((let ((confirmation (ref-variable imail-expunge-confirmation)))
-                (or (eq? confirmation 'NONE)
+                (or (null? confirmation)
                     (let ((prompt
                            (string-append "Expunge "
                                           (number->string n)
                                           " message"
                                           (if (> n 1) "s" "")
                                           " marked for deletion")))
-                      (case (ref-variable imail-expunge-confirmation)
-                        ((BRIEF) (prompt-for-confirmation? prompt))
-                        ((VERBOSE) (prompt-for-yes-or-no? prompt))
-                        ((COMPLETE)
-                         (cleanup-pop-up-buffers
-                          (lambda ()
-                            (imail-expunge-pop-up-messages folder)
-                            (prompt-for-yes-or-no? prompt))))
-                        (else #t)))))
+                      (let ((do-prompt
+                             (lambda ()
+                               (if (memq 'BRIEF confirmation)
+                                   (prompt-for-confirmation? prompt)
+                                   (prompt-for-yes-or-no? prompt)))))
+                        (if (memq 'SHOW-MESSAGES confirmation)
+                            (cleanup-pop-up-buffers
+                             (lambda ()
+                               (imail-expunge-pop-up-messages folder)
+                               (do-prompt)))
+                            (do-prompt))))))
               (let ((message
                      (let ((message (selected-message)))
                        (if (message-deleted? message)
index 1102d46cba511aa8eb0df7c95b90a8344fa3681b..a3efafcf8da0bdc2567c579dca1d6d22189d1d2e 100644 (file)
@@ -1,9 +1,12 @@
 IMAIL To-Do List
-$Id: todo.txt,v 1.50 2000/05/25 05:06:55 cph Exp $
+$Id: todo.txt,v 1.51 2000/05/25 22:16:53 cph Exp $
 
 Bug fixes
 ---------
 
+* M-x imail should run M-x imail-get-new-mail when started.  This
+  probably means that OPEN-FOLDER need not initiate a connection.
+
 * M-x imail-copy-messages re-reads the target folder UIDs for each
   message that is written, when the target folder is not being
   visited.  [I haven't seen this lately.  Maybe it's fixed?]