comparison lisp/mail/rmailout.el @ 4265:2812d8619305

(rmail-output): New arg NOATTRIBUTE.
author Richard M. Stallman <rms@gnu.org>
date Sun, 25 Jul 1993 02:19:47 +0000
parents af1bbadc70c7
children 38a0f0209707
comparison
equal deleted inserted replaced
4264:af1bbadc70c7 4265:2812d8619305
146 (looking-at "BABYL OPTIONS:")) 146 (looking-at "BABYL OPTIONS:"))
147 (kill-buffer buf)))) 147 (kill-buffer buf))))
148 148
149 ;;; There are functions elsewhere in Emacs that use this function; check 149 ;;; There are functions elsewhere in Emacs that use this function; check
150 ;;; them out before you change the calling method. 150 ;;; them out before you change the calling method.
151 (defun rmail-output (file-name &optional count) 151 (defun rmail-output (file-name &optional count noattribute)
152 "Append this message to Unix mail file named FILE-NAME. 152 "Append this message to Unix mail file named FILE-NAME.
153 A prefix argument N says to output N consecutive messages 153 A prefix argument N says to output N consecutive messages
154 starting with the current one. Deleted messages are skipped and don't count. 154 starting with the current one. Deleted messages are skipped and don't count.
155 When called from lisp code, N may be omitted." 155 When called from lisp code, N may be omitted.
156
157 The optional third argument NOATTRIBUTE, if non-nil, says not
158 to set the `filed' attribute, and not to display a message."
156 (interactive 159 (interactive
157 (list (setq rmail-last-file 160 (list (setq rmail-last-file
158 (read-file-name 161 (read-file-name
159 (concat "Output message to Unix mail file" 162 (concat "Output message to Unix mail file"
160 (if rmail-last-file 163 (if rmail-last-file
192 ;; (note that this isn't really quoting, as there is no requirement 195 ;; (note that this isn't really quoting, as there is no requirement
193 ;; that "\n[>]+From " be quoted in the same transparent way.) 196 ;; that "\n[>]+From " be quoted in the same transparent way.)
194 (while (search-forward "\nFrom " nil t) 197 (while (search-forward "\nFrom " nil t)
195 (forward-char -5) 198 (forward-char -5)
196 (insert ?>)) 199 (insert ?>))
197 (append-to-file (point-min) (point-max) file-name)) 200 (write-region (point-min) (point-max) file-name t
201 (if noattribute 'nomsg)))
198 (kill-buffer tembuf)) 202 (kill-buffer tembuf))
199 (if (equal major-mode 'rmail-mode) 203 (or noattribute
200 (rmail-set-attribute "filed" t)) 204 (if (equal major-mode 'rmail-mode)
205 (rmail-set-attribute "filed" t)))
201 (setq count (1- count)) 206 (setq count (1- count))
202 (if rmail-delete-after-output 207 (if rmail-delete-after-output
203 (rmail-delete-forward) 208 (rmail-delete-forward)
204 (if (> count 0) 209 (if (> count 0)
205 (rmail-next-undeleted-message 1)))))) 210 (rmail-next-undeleted-message 1))))))