diff options
| author | Richard M. Stallman | 1997-04-16 00:56:40 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-04-16 00:56:40 +0000 |
| commit | 93cba994250fcd3229912e03258f3eb68875ada6 (patch) | |
| tree | 7e3dc1588e64d49cc4585b3e8b4fdd2e8a69374e | |
| parent | f0cca206dcfb328be93961aaaa556d4409987cc1 (diff) | |
| download | emacs-93cba994250fcd3229912e03258f3eb68875ada6.tar.gz emacs-93cba994250fcd3229912e03258f3eb68875ada6.zip | |
(rmail-summary-delete-forward): Argument is now a repeat count.
(rmail-summary-delete-backward): Corresponding changes.
| -rw-r--r-- | lisp/mail/rmailsum.el | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 04d1fc11351..076a3d26aff 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el | |||
| @@ -570,17 +570,19 @@ If N is negative, go forwards instead." | |||
| 570 | 570 | ||
| 571 | ;; Delete and undelete summary commands. | 571 | ;; Delete and undelete summary commands. |
| 572 | 572 | ||
| 573 | (defun rmail-summary-delete-forward (&optional backward) | 573 | (defun rmail-summary-delete-forward (&optional count) |
| 574 | "Delete this message and move to next nondeleted one. | 574 | "Delete this message and move to next nondeleted one. |
| 575 | Deleted messages stay in the file until the \\[rmail-expunge] command is given. | 575 | Deleted messages stay in the file until the \\[rmail-expunge] command is given. |
| 576 | With prefix argument, delete and move backward." | 576 | A prefix argument serves as a repeat count; |
| 577 | (interactive "P") | 577 | a negative argument means to delete and move backward." |
| 578 | (let (end) | 578 | (interactive "p") |
| 579 | (rmail-summary-goto-msg) | 579 | (let (end del-msg |
| 580 | (pop-to-buffer rmail-buffer) | 580 | (backward (< count 0))) |
| 581 | (rmail-delete-message) | 581 | (while (/= count 0) |
| 582 | (let ((del-msg rmail-current-message)) | 582 | (rmail-summary-goto-msg) |
| 583 | (pop-to-buffer rmail-summary-buffer) | 583 | (with-current-buffer rmail-buffer |
| 584 | (rmail-delete-message) | ||
| 585 | (setq del-msg rmail-current-message)) | ||
| 584 | (rmail-summary-mark-deleted del-msg) | 586 | (rmail-summary-mark-deleted del-msg) |
| 585 | (while (and (not (if backward (bobp) (eobp))) | 587 | (while (and (not (if backward (bobp) (eobp))) |
| 586 | (save-excursion (beginning-of-line) | 588 | (save-excursion (beginning-of-line) |
| @@ -588,13 +590,17 @@ With prefix argument, delete and move backward." | |||
| 588 | (forward-line (if backward -1 1))) | 590 | (forward-line (if backward -1 1))) |
| 589 | ;; It looks ugly to move to the empty line at end of buffer. | 591 | ;; It looks ugly to move to the empty line at end of buffer. |
| 590 | (and (eobp) (not backward) | 592 | (and (eobp) (not backward) |
| 591 | (forward-line -1))))) | 593 | (forward-line -1)) |
| 594 | (setq count | ||
| 595 | (if (> count 0) (1- count) (1+ count)))))) | ||
| 592 | 596 | ||
| 593 | (defun rmail-summary-delete-backward () | 597 | (defun rmail-summary-delete-backward (&optional count) |
| 594 | "Delete this message and move to previous nondeleted one. | 598 | "Delete this message and move to previous nondeleted one. |
| 595 | Deleted messages stay in the file until the \\[rmail-expunge] command is given." | 599 | Deleted messages stay in the file until the \\[rmail-expunge] command is given. |
| 596 | (interactive) | 600 | A prefix argument serves as a repeat count; |
| 597 | (rmail-summary-delete-forward t)) | 601 | a negative argument means to delete and move forward." |
| 602 | (interactive "p") | ||
| 603 | (rmail-summary-delete-forward (- count))) | ||
| 598 | 604 | ||
| 599 | (defun rmail-summary-mark-deleted (&optional n undel) | 605 | (defun rmail-summary-mark-deleted (&optional n undel) |
| 600 | ;; Since third arg is t, this only alters the summary, not the Rmail buf. | 606 | ;; Since third arg is t, this only alters the summary, not the Rmail buf. |