Mercurial > emacs
changeset 1866:a712cff3b6e7
* rmailout.el (rmail-output, rmail-output-to-mail-file): Reverse
the order of the arguments and make COUNT optional, for backward
compatibility's sake.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sun, 14 Feb 1993 14:34:47 +0000 |
parents | 05be3e0c082f |
children | 4262f19c6cc9 |
files | lisp/mail/rmailout.el |
diffstat | 1 files changed, 16 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/rmailout.el Sun Feb 14 14:33:44 1993 +0000 +++ b/lisp/mail/rmailout.el Sun Feb 14 14:34:47 1993 +0000 @@ -31,15 +31,16 @@ "*Alist matching regexps to suggested output Rmail files. This is a list of elements of the form (REGEXP . FILENAME).") -(defun rmail-output-to-rmail-file (count file-name) +;;; There are functions elsewhere in Emacs that use this function; check +;;; them out before you change the calling method. +(defun rmail-output-to-rmail-file (file-name &optional count) "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 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 (list (prefix-numeric-value current-prefix-arg) - (read-file-name + (interactive (list (read-file-name (concat "Output message to Rmail file: (default " (file-name-nondirectory rmail-last-rmail-file) ") ") @@ -54,7 +55,9 @@ (setq answer (cdr (car tail)))) (setq tail (cdr tail)))) ;; If not suggestions, use same file as last time. - (or answer rmail-last-rmail-file))))) + (or answer rmail-last-rmail-file))) + (prefix-numeric-value current-prefix-arg))) + (or count (setq count 1)) (setq file-name (expand-file-name file-name (file-name-directory rmail-last-rmail-file))) @@ -122,13 +125,15 @@ (if (> count 0) (rmail-next-undeleted-message 1))))) -(defun rmail-output (count file-name) +;;; There are functions elsewhere in Emacs that use this function; check +;;; them out before you change the calling method. +(defun rmail-output (file-name &optional count) "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." +starting with the current one. Deleted messages are skipped and don't count. +When called from lisp code, N may be omitted." (interactive - (list (prefix-numeric-value current-prefix-arg) - (read-file-name + (list (read-file-name (concat "Output message to Unix mail file" (if rmail-last-file (concat " (default " @@ -136,7 +141,9 @@ "): " ) ": ")) (and rmail-last-file (file-name-directory rmail-last-file)) - rmail-last-file))) + rmail-last-file) + (prefix-numeric-value current-prefix-arg))) + (or count (setq count 1)) (setq file-name (expand-file-name file-name (and rmail-last-file