# HG changeset patch # User Jim Blandy # Date 729700487 0 # Node ID a712cff3b6e724c079ad67754ca916cf615370ff # Parent 05be3e0c082f720252fde736fa667a6dc08dfdc0 * rmailout.el (rmail-output, rmail-output-to-mail-file): Reverse the order of the arguments and make COUNT optional, for backward compatibility's sake. diff -r 05be3e0c082f -r a712cff3b6e7 lisp/mail/rmailout.el --- 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