mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-17 17:58:46 +00:00
(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.
This commit is contained in:
parent
c782ad7a64
commit
f9e3db5559
@ -1456,7 +1456,7 @@ see the documentation of `rmail-resend'."
|
||||
|
||||
;; Summary output commands.
|
||||
|
||||
(defun rmail-summary-output-to-rmail-file (&optional file-name)
|
||||
(defun rmail-summary-output-to-rmail-file (&optional file-name &optional n)
|
||||
"Append the current message to an Rmail file named FILE-NAME.
|
||||
If the file does not exist, ask if it should be created.
|
||||
If file is being visited, the message is appended to the Emacs
|
||||
@ -1464,11 +1464,41 @@ buffer visiting that file.
|
||||
|
||||
A prefix argument N says to output N consecutive messages
|
||||
starting with the current one. Deleted messages are skipped and don't count."
|
||||
(interactive)
|
||||
(with-current-buffer rmail-buffer
|
||||
(if file-name
|
||||
(rmail-output-to-rmail-file file-name)
|
||||
(call-interactively 'rmail-output-to-rmail-file))))
|
||||
(interactive
|
||||
(progn (require 'rmailout)
|
||||
(list (rmail-output-read-rmail-file-name)
|
||||
(prefix-numeric-value current-prefix-arg))))
|
||||
(let ((i 0))
|
||||
(while (< i n)
|
||||
(setq i (1+ i))
|
||||
(rmail-summary-goto-msg)
|
||||
(with-current-buffer rmail-buffer
|
||||
(let ((rmail-delete-after-output nil))
|
||||
(rmail-output-to-rmail-file file-name 1)))
|
||||
(if rmail-delete-after-output
|
||||
(rmail-summary-delete-forward nil)
|
||||
(if (< i n)
|
||||
(rmail-summary-next-msg 1))))))
|
||||
|
||||
(defun rmail-summary-output (&optional file-name n)
|
||||
"Append this message to Unix mail file named FILE-NAME.
|
||||
|
||||
A prefix argument N says to output N consecutive messages
|
||||
starting with the current one. Deleted messages are skipped and don't count."
|
||||
(interactive
|
||||
(progn (require 'rmailout)
|
||||
(list (rmail-output-read-file-name)
|
||||
(prefix-numeric-value current-prefix-arg))))
|
||||
(let ((i 0))
|
||||
(while (< i n)
|
||||
(setq i (1+ i))
|
||||
(with-current-buffer rmail-buffer
|
||||
(let ((rmail-delete-after-output nil))
|
||||
(rmail-output file-name 1)))
|
||||
(if rmail-delete-after-output
|
||||
(rmail-summary-delete-forward nil)
|
||||
(if (< i n)
|
||||
(rmail-summary-next-msg 1))))))
|
||||
|
||||
(defun rmail-summary-output-menu ()
|
||||
"Output current message to another Rmail file, chosen with a menu.
|
||||
@ -1483,17 +1513,6 @@ The variables `rmail-secondary-file-directory' and
|
||||
(if rmail-delete-after-output
|
||||
(rmail-summary-delete-forward nil)))
|
||||
|
||||
(defun rmail-summary-output (&optional file-name)
|
||||
"Append this message to Unix mail file named FILE-NAME.
|
||||
|
||||
A prefix argument N says to output N consecutive messages
|
||||
starting with the current one. Deleted messages are skipped and don't count."
|
||||
(interactive)
|
||||
(with-current-buffer rmail-buffer
|
||||
(if file-name
|
||||
(rmail-output file-name)
|
||||
(call-interactively 'rmail-output))))
|
||||
|
||||
(defun rmail-summary-construct-io-menu ()
|
||||
(let ((files (rmail-find-all-files rmail-secondary-file-directory)))
|
||||
(if files
|
||||
|
Loading…
Reference in New Issue
Block a user