From 82252971e0932aded6a45a6eb5e412ba08d8f10c Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 25 May 2000 22:16:53 +0000 Subject: [PATCH] Generalize imail-expunge-confirmation to make the type of prompt and the showing of message independently selectable. --- v7/src/imail/imail-top.scm | 38 ++++++++++++++++++++------------------ v7/src/imail/todo.txt | 5 ++++- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index fcf079280..69f15dafb 100644 --- a/v7/src/imail/imail-top.scm +++ b/v7/src/imail/imail-top.scm @@ -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) diff --git a/v7/src/imail/todo.txt b/v7/src/imail/todo.txt index 1102d46cb..a3efafcf8 100644 --- a/v7/src/imail/todo.txt +++ b/v7/src/imail/todo.txt @@ -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?] -- 2.25.1