From: Chris Hanson Date: Fri, 19 May 2000 17:50:30 +0000 (+0000) Subject: Share flag-prompting code to summary buffer commands. X-Git-Tag: 20090517-FFI~3792 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=816602ff039e69a691f777b8dd708291a2f077c7;p=mit-scheme.git Share flag-prompting code to summary buffer commands. --- diff --git a/v7/src/imail/imail-summary.scm b/v7/src/imail/imail-summary.scm index d4ac44c3f..a83071745 100644 --- a/v7/src/imail/imail-summary.scm +++ b/v7/src/imail/imail-summary.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-summary.scm,v 1.10 2000/05/19 17:26:24 cph Exp $ +;;; $Id: imail-summary.scm,v 1.11 2000/05/19 17:50:30 cph Exp $ ;;; ;;; Copyright (c) 2000 Massachusetts Institute of Technology ;;; @@ -53,7 +53,8 @@ If false, the message buffer is updated but not popped up." "Display a summary of the selected folder, one line per message. Only messages marked with one of the given flags are shown. The flags are specified as a comma-separated list of names." - "sFlags to summarize by" + (lambda () + (list (imail-prompt-for-flags "Flags to summarize by"))) (lambda (flags-string) (imail-summary (string-append "Flags " flags-string) (let ((flags (parse-comma-list-string flags-string))) diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index 18203e479..a62343b1f 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.68 2000/05/19 16:32:51 cph Exp $ +;;; $Id: imail-top.scm,v 1.69 2000/05/19 17:50:26 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -385,7 +385,8 @@ FLAGS should be a comma-separated list of flag names. If FLAGS is empty, the last set of flags specified is used. With prefix argument N moves forward N messages with these flags." (lambda () - (flagged-message-arguments "Move to next message with flags")) + (list (command-argument) + (imail-prompt-for-flags "Move to next message with flags"))) (lambda (n flags) (let ((flags (map string-trim (burst-string flags "," #f)))) (if (null? flags) @@ -412,17 +413,17 @@ FLAGS should be a comma-separated list of flag names. If FLAGS is empty, the last set of flags specified is used. With prefix argument N moves backward N messages with these flags." (lambda () - (flagged-message-arguments "Move to previous message with flags")) + (list (command-argument) + (imail-prompt-for-flags "Move to previous message with flags"))) (lambda (n flags) ((ref-command imail-next-flagged-message) (- n) flags))) -(define (flagged-message-arguments prompt) - (list (command-argument) - (prompt-for-string prompt - #f - 'DEFAULT-TYPE 'INSERTED-DEFAULT - 'HISTORY 'IMAIL-NEXT-FLAGGED-MESSAGE - 'HISTORY-INDEX 0))) +(define (imail-prompt-for-flags prompt) + (prompt-for-string prompt + #f + 'DEFAULT-TYPE 'INSERTED-DEFAULT + 'HISTORY 'IMAIL-PROMPT-FOR-FLAGS + 'HISTORY-INDEX 0)) (define (move-relative delta predicate noun operation) (if (not (= 0 delta))