225 |
(if redelete (rmail-set-attribute "deleted" t)))) |
(if redelete (rmail-set-attribute "deleted" t)))) |
226 |
(setq count (1- count)) |
(setq count (1- count)) |
227 |
(if rmail-delete-after-output |
(if rmail-delete-after-output |
228 |
(unless |
(unless |
229 |
(if (and (= count 0) stay) |
(if (and (= count 0) stay) |
230 |
(rmail-delete-message) |
(rmail-delete-message) |
231 |
(rmail-delete-forward)) |
(rmail-delete-forward)) |
232 |
(setq count 0)) |
(setq count 0)) |
233 |
(if (> count 0) |
(if (> count 0) |
234 |
(unless |
(unless |
235 |
(if (not stay) (rmail-next-undeleted-message 1)) |
(if (not stay) (rmail-next-undeleted-message 1)) |
236 |
(setq count 0))))))) |
(setq count 0))))))) |
237 |
|
|
246 |
;; NOT-RMAIL if t means this buffer does not have the full header |
;; NOT-RMAIL if t means this buffer does not have the full header |
247 |
;; and *** EOOH *** that a message in an Rmail file has. |
;; and *** EOOH *** that a message in an Rmail file has. |
248 |
(defun rmail-delete-unwanted-fields (&optional not-rmail) |
(defun rmail-delete-unwanted-fields (&optional not-rmail) |
249 |
(if rmail-fields-not-to-output |
(if rmail-fields-not-to-output |
250 |
(save-excursion |
(save-excursion |
251 |
(goto-char (point-min)) |
(goto-char (point-min)) |
252 |
;; Find the end of the header. |
;; Find the end of the header. |
296 |
(tembuf (get-buffer-create " rmail-output")) |
(tembuf (get-buffer-create " rmail-output")) |
297 |
(original-headers-p |
(original-headers-p |
298 |
(and (not from-gnus) |
(and (not from-gnus) |
299 |
(save-excursion |
(save-excursion |
300 |
(save-restriction |
(save-restriction |
301 |
(narrow-to-region (rmail-msgbeg rmail-current-message) (point-max)) |
(narrow-to-region (rmail-msgbeg rmail-current-message) (point-max)) |
302 |
(goto-char (point-min)) |
(goto-char (point-min)) |
303 |
(forward-line 1) |
(forward-line 1) |
304 |
(= (following-char) ?0))))) |
(= (following-char) ?0))))) |
305 |
header-beginning |
header-beginning |
306 |
mail-from mime-version) |
mail-from mime-version content-type) |
307 |
(while (> count 0) |
(while (> count 0) |
308 |
;; Preserve the Mail-From and MIME-Version fields |
;; Preserve the Mail-From and MIME-Version fields |
309 |
;; even if they have been pruned. |
;; even if they have been pruned. |
315 |
(setq header-beginning (point)) |
(setq header-beginning (point)) |
316 |
(search-forward "\n*** EOOH ***\n") |
(search-forward "\n*** EOOH ***\n") |
317 |
(narrow-to-region header-beginning (point)) |
(narrow-to-region header-beginning (point)) |
318 |
(setq mail-from |
(setq mail-from (mail-fetch-field "Mail-From")) |
319 |
(mail-fetch-field "Mail-From") |
(unless rmail-enable-mime |
320 |
mime-version |
(setq mime-version (mail-fetch-field "MIME-Version") |
321 |
(unless rmail-enable-mime |
content-type (mail-fetch-field "Content-type")))))) |
|
(mail-fetch-field "MIME-Version")))))) |
|
322 |
(save-excursion |
(save-excursion |
323 |
(set-buffer tembuf) |
(set-buffer tembuf) |
324 |
(erase-buffer) |
(erase-buffer) |
349 |
"unknown")) |
"unknown")) |
350 |
" " (current-time-string) "\n")) |
" " (current-time-string) "\n")) |
351 |
(if mime-version |
(if mime-version |
352 |
(insert "MIME-Version: " mime-version "\n")) |
(insert "MIME-Version: " mime-version |
353 |
|
"\nContent-type: " content-type "\n")) |
354 |
;; ``Quote'' "\nFrom " as "\n>From " |
;; ``Quote'' "\nFrom " as "\n>From " |
355 |
;; (note that this isn't really quoting, as there is no requirement |
;; (note that this isn't really quoting, as there is no requirement |
356 |
;; that "\n[>]+From " be quoted in the same transparent way.) |
;; that "\n[>]+From " be quoted in the same transparent way.) |
374 |
(if (and next-message-p original-headers-p) |
(if (and next-message-p original-headers-p) |
375 |
(rmail-toggle-header)) |
(rmail-toggle-header)) |
376 |
(if (and (> count 0) (not next-message-p)) |
(if (and (> count 0) (not next-message-p)) |
377 |
(progn |
(progn |
378 |
(error |
(error |
379 |
(save-excursion |
(save-excursion |
380 |
(set-buffer rmailbuf) |
(set-buffer rmailbuf) |