diff options
| author | Richard M. Stallman | 1999-01-04 01:36:00 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1999-01-04 01:36:00 +0000 |
| commit | f9e3db555986c46728835193aa0db435b0c417cb (patch) | |
| tree | ebf2241d6d2b84d1dae5fc1794ab383dc08b49e8 | |
| parent | c782ad7a64166e2db58185799f3a5a9f9f625c7e (diff) | |
| download | emacs-f9e3db555986c46728835193aa0db435b0c417cb.tar.gz emacs-f9e3db555986c46728835193aa0db435b0c417cb.zip | |
(rmail-summary-output-to-rmail-file):
Use rmail-output-read-rmail-file-name to read the file name.
Always call rmail-output-to-rmail-file noninteractively.
When count > 1, do the loop here.
Handle rmail-delete-after-output here.
(rmail-summary-output): Similar changes.
| -rw-r--r-- | lisp/mail/rmailsum.el | 53 |
1 files changed, 36 insertions, 17 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index cd289c0df24..f74d8c8477a 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el | |||
| @@ -1456,7 +1456,7 @@ see the documentation of `rmail-resend'." | |||
| 1456 | 1456 | ||
| 1457 | ;; Summary output commands. | 1457 | ;; Summary output commands. |
| 1458 | 1458 | ||
| 1459 | (defun rmail-summary-output-to-rmail-file (&optional file-name) | 1459 | (defun rmail-summary-output-to-rmail-file (&optional file-name &optional n) |
| 1460 | "Append the current message to an Rmail file named FILE-NAME. | 1460 | "Append the current message to an Rmail file named FILE-NAME. |
| 1461 | If the file does not exist, ask if it should be created. | 1461 | If the file does not exist, ask if it should be created. |
| 1462 | If file is being visited, the message is appended to the Emacs | 1462 | If file is being visited, the message is appended to the Emacs |
| @@ -1464,11 +1464,41 @@ buffer visiting that file. | |||
| 1464 | 1464 | ||
| 1465 | A prefix argument N says to output N consecutive messages | 1465 | A prefix argument N says to output N consecutive messages |
| 1466 | starting with the current one. Deleted messages are skipped and don't count." | 1466 | starting with the current one. Deleted messages are skipped and don't count." |
| 1467 | (interactive) | 1467 | (interactive |
| 1468 | (with-current-buffer rmail-buffer | 1468 | (progn (require 'rmailout) |
| 1469 | (if file-name | 1469 | (list (rmail-output-read-rmail-file-name) |
| 1470 | (rmail-output-to-rmail-file file-name) | 1470 | (prefix-numeric-value current-prefix-arg)))) |
| 1471 | (call-interactively 'rmail-output-to-rmail-file)))) | 1471 | (let ((i 0)) |
| 1472 | (while (< i n) | ||
| 1473 | (setq i (1+ i)) | ||
| 1474 | (rmail-summary-goto-msg) | ||
| 1475 | (with-current-buffer rmail-buffer | ||
| 1476 | (let ((rmail-delete-after-output nil)) | ||
| 1477 | (rmail-output-to-rmail-file file-name 1))) | ||
| 1478 | (if rmail-delete-after-output | ||
| 1479 | (rmail-summary-delete-forward nil) | ||
| 1480 | (if (< i n) | ||
| 1481 | (rmail-summary-next-msg 1)))))) | ||
| 1482 | |||
| 1483 | (defun rmail-summary-output (&optional file-name n) | ||
| 1484 | "Append this message to Unix mail file named FILE-NAME. | ||
| 1485 | |||
| 1486 | A prefix argument N says to output N consecutive messages | ||
| 1487 | starting with the current one. Deleted messages are skipped and don't count." | ||
| 1488 | (interactive | ||
| 1489 | (progn (require 'rmailout) | ||
| 1490 | (list (rmail-output-read-file-name) | ||
| 1491 | (prefix-numeric-value current-prefix-arg)))) | ||
| 1492 | (let ((i 0)) | ||
| 1493 | (while (< i n) | ||
| 1494 | (setq i (1+ i)) | ||
| 1495 | (with-current-buffer rmail-buffer | ||
| 1496 | (let ((rmail-delete-after-output nil)) | ||
| 1497 | (rmail-output file-name 1))) | ||
| 1498 | (if rmail-delete-after-output | ||
| 1499 | (rmail-summary-delete-forward nil) | ||
| 1500 | (if (< i n) | ||
| 1501 | (rmail-summary-next-msg 1)))))) | ||
| 1472 | 1502 | ||
| 1473 | (defun rmail-summary-output-menu () | 1503 | (defun rmail-summary-output-menu () |
| 1474 | "Output current message to another Rmail file, chosen with a menu. | 1504 | "Output current message to another Rmail file, chosen with a menu. |
| @@ -1483,17 +1513,6 @@ The variables `rmail-secondary-file-directory' and | |||
| 1483 | (if rmail-delete-after-output | 1513 | (if rmail-delete-after-output |
| 1484 | (rmail-summary-delete-forward nil))) | 1514 | (rmail-summary-delete-forward nil))) |
| 1485 | 1515 | ||
| 1486 | (defun rmail-summary-output (&optional file-name) | ||
| 1487 | "Append this message to Unix mail file named FILE-NAME. | ||
| 1488 | |||
| 1489 | A prefix argument N says to output N consecutive messages | ||
| 1490 | starting with the current one. Deleted messages are skipped and don't count." | ||
| 1491 | (interactive) | ||
| 1492 | (with-current-buffer rmail-buffer | ||
| 1493 | (if file-name | ||
| 1494 | (rmail-output file-name) | ||
| 1495 | (call-interactively 'rmail-output)))) | ||
| 1496 | |||
| 1497 | (defun rmail-summary-construct-io-menu () | 1516 | (defun rmail-summary-construct-io-menu () |
| 1498 | (let ((files (rmail-find-all-files rmail-secondary-file-directory))) | 1517 | (let ((files (rmail-find-all-files rmail-secondary-file-directory))) |
| 1499 | (if files | 1518 | (if files |