aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1993-02-14 14:34:47 +0000
committerJim Blandy1993-02-14 14:34:47 +0000
commit37c0ad585e2c94330fc434b66e61dbd1ced4073e (patch)
treee62c1e7234e4bc91c83f4cc1d160483abdece53d
parent6338c7ba53598d34b4c17fa22811488b51c66da1 (diff)
downloademacs-37c0ad585e2c94330fc434b66e61dbd1ced4073e.tar.gz
emacs-37c0ad585e2c94330fc434b66e61dbd1ced4073e.zip
* rmailout.el (rmail-output, rmail-output-to-mail-file): Reverse
the order of the arguments and make COUNT optional, for backward compatibility's sake.
-rw-r--r--lisp/mail/rmailout.el25
1 files changed, 16 insertions, 9 deletions
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index 4710b49d6c6..ad368a532b5 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -31,15 +31,16 @@
31 "*Alist matching regexps to suggested output Rmail files. 31 "*Alist matching regexps to suggested output Rmail files.
32This is a list of elements of the form (REGEXP . FILENAME).") 32This is a list of elements of the form (REGEXP . FILENAME).")
33 33
34(defun rmail-output-to-rmail-file (count file-name) 34;;; There are functions elsewhere in Emacs that use this function; check
35;;; them out before you change the calling method.
36(defun rmail-output-to-rmail-file (file-name &optional count)
35 "Append the current message to an Rmail file named FILE-NAME. 37 "Append the current message to an Rmail file named FILE-NAME.
36If the file does not exist, ask if it should be created. 38If the file does not exist, ask if it should be created.
37If file is being visited, the message is appended to the Emacs 39If file is being visited, the message is appended to the Emacs
38buffer visiting that file. 40buffer visiting that file.
39A prefix argument N says to output N consecutive messages 41A prefix argument N says to output N consecutive messages
40starting with the current one. Deleted messages are skipped and don't count." 42starting with the current one. Deleted messages are skipped and don't count."
41 (interactive (list (prefix-numeric-value current-prefix-arg) 43 (interactive (list (read-file-name
42 (read-file-name
43 (concat "Output message to Rmail file: (default " 44 (concat "Output message to Rmail file: (default "
44 (file-name-nondirectory rmail-last-rmail-file) 45 (file-name-nondirectory rmail-last-rmail-file)
45 ") ") 46 ") ")
@@ -54,7 +55,9 @@ starting with the current one. Deleted messages are skipped and don't count."
54 (setq answer (cdr (car tail)))) 55 (setq answer (cdr (car tail))))
55 (setq tail (cdr tail)))) 56 (setq tail (cdr tail))))
56 ;; If not suggestions, use same file as last time. 57 ;; If not suggestions, use same file as last time.
57 (or answer rmail-last-rmail-file))))) 58 (or answer rmail-last-rmail-file)))
59 (prefix-numeric-value current-prefix-arg)))
60 (or count (setq count 1))
58 (setq file-name 61 (setq file-name
59 (expand-file-name file-name 62 (expand-file-name file-name
60 (file-name-directory rmail-last-rmail-file))) 63 (file-name-directory rmail-last-rmail-file)))
@@ -122,13 +125,15 @@ starting with the current one. Deleted messages are skipped and don't count."
122 (if (> count 0) 125 (if (> count 0)
123 (rmail-next-undeleted-message 1))))) 126 (rmail-next-undeleted-message 1)))))
124 127
125(defun rmail-output (count file-name) 128;;; There are functions elsewhere in Emacs that use this function; check
129;;; them out before you change the calling method.
130(defun rmail-output (file-name &optional count)
126 "Append this message to Unix mail file named FILE-NAME. 131 "Append this message to Unix mail file named FILE-NAME.
127A prefix argument N says to output N consecutive messages 132A prefix argument N says to output N consecutive messages
128starting with the current one. Deleted messages are skipped and don't count." 133starting with the current one. Deleted messages are skipped and don't count.
134When called from lisp code, N may be omitted."
129 (interactive 135 (interactive
130 (list (prefix-numeric-value current-prefix-arg) 136 (list (read-file-name
131 (read-file-name
132 (concat "Output message to Unix mail file" 137 (concat "Output message to Unix mail file"
133 (if rmail-last-file 138 (if rmail-last-file
134 (concat " (default " 139 (concat " (default "
@@ -136,7 +141,9 @@ starting with the current one. Deleted messages are skipped and don't count."
136 "): " ) 141 "): " )
137 ": ")) 142 ": "))
138 (and rmail-last-file (file-name-directory rmail-last-file)) 143 (and rmail-last-file (file-name-directory rmail-last-file))
139 rmail-last-file))) 144 rmail-last-file)
145 (prefix-numeric-value current-prefix-arg)))
146 (or count (setq count 1))
140 (setq file-name 147 (setq file-name
141 (expand-file-name file-name 148 (expand-file-name file-name
142 (and rmail-last-file 149 (and rmail-last-file