From: Brian A. LaMacchia Date: Wed, 8 Jan 1992 16:11:28 +0000 (+0000) Subject: Added prefix args to delete-forward, delete-backward, X-Git-Tag: 20090517-FFI~10015 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=086fa3d3a5a85a4fcc11a22e55b377200a1d63e9;p=mit-scheme.git Added prefix args to delete-forward, delete-backward, undelete-forward and undelete-backward. --- diff --git a/v7/src/edwin/rmailsum.scm b/v7/src/edwin/rmailsum.scm index ccc28335d..32905f154 100644 --- a/v7/src/edwin/rmailsum.scm +++ b/v7/src/edwin/rmailsum.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/rmailsum.scm,v 1.18 1992/01/08 15:24:29 bal Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/rmailsum.scm,v 1.19 1992/01/08 16:11:28 bal Exp $ ;;; ;;; Copyright (c) 1991 Massachusetts Institute of Technology ;;; @@ -48,7 +48,7 @@ (define-variable rmailsum-rcs-header "The RCS header of the rmailsum.scm file." - "$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/rmailsum.scm,v 1.18 1992/01/08 15:24:29 bal Exp $" + "$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/rmailsum.scm,v 1.19 1992/01/08 16:11:28 bal Exp $" string?) (define-variable-per-buffer rmail-buffer @@ -624,18 +624,26 @@ shown in the RMAIL buffer, warp to the appropriate message." (set-buffer-read-only! (current-buffer)))))) (define-command rmail-summary-delete-message-forward - "Delete this message and move to next undeleted message." - '() - (lambda () - ((ref-command rmail-summary-delete-message)) - ((ref-command rmail-summary-next-undeleted-message) 1))) + "Delete ARG undeleted messages and move to next undeleted message." + "p" + (lambda (arg) + (let loop ((count arg)) + (if (> count 0) + (begin + ((ref-command rmail-summary-delete-message)) + ((ref-command rmail-summary-next-undeleted-message) 1) + (loop (-1+ count))))))) (define-command rmail-summary-delete-message-backward - "Delete this message and move to previous undeleted message." - '() - (lambda () - ((ref-command rmail-summary-delete-message)) - ((ref-command rmail-summary-previous-undeleted-message) 1))) + "Delete ARG undeleted messages and move to previous undeleted message." + "p" + (lambda (arg) + (let loop ((count arg)) + (if (> count 0) + (begin + ((ref-command rmail-summary-delete-message)) + ((ref-command rmail-summary-previous-undeleted-message) 1) + (loop (-1+ count))))))) (define-command rmail-summary-undelete-message "Undelete this message and stay here." @@ -655,34 +663,40 @@ shown in the RMAIL buffer, warp to the appropriate message." (set-buffer-read-only! (current-buffer))))))) (define-command rmail-summary-undelete-message-backward - "Search backwards from current message for first deleted message, -and undelete it." - '() - (lambda () - (let ((the-mark - (re-search-backward "^....D" - (line-end (current-point) 0) - (buffer-start (current-buffer))))) - (if the-mark - (begin - (set-current-point! (line-start the-mark 0)) - (rmail-summary-goto-message-current-line) - ((ref-command rmail-summary-undelete-message))))))) + "Search backwards from current message for first ARG deleted +messages, and undelete them." + "p" + (lambda (arg) + (let loop ((count arg)) + (if (> count 0) + (let ((the-mark + (re-search-backward "^....D" + (line-end (current-point) 0) + (buffer-start (current-buffer))))) + (if the-mark + (begin + (set-current-point! (line-start the-mark 0)) + (rmail-summary-goto-message-current-line) + ((ref-command rmail-summary-undelete-message)))) + (loop (-1+ count))))))) (define-command rmail-summary-undelete-message-forward - "Search forward from current message for first deleted message, -and undelete it." - '() - (lambda () - (let ((the-mark - (re-search-forward "^....D" - (line-start (current-point) 0) - (buffer-end (current-buffer))))) - (if the-mark - (begin - (set-current-point! (line-start the-mark 0)) - (rmail-summary-goto-message-current-line) - ((ref-command rmail-summary-undelete-message))))))) + "Search forward from current message for first ARG deleted +messages, and undelete them." + "p" + (lambda (arg) + (let loop ((count arg)) + (if (> count 0) + (let ((the-mark + (re-search-forward "^....D" + (line-start (current-point) 0) + (buffer-end (current-buffer))))) + (if the-mark + (begin + (set-current-point! (line-start the-mark 0)) + (rmail-summary-goto-message-current-line) + ((ref-command rmail-summary-undelete-message)))) + (loop (-1+ count))))))) (define-command rmail-summary-exit "Exit RMAIL Summary mode, remaining within RMAIL."