diff options
| author | Francesco Potortì | 2003-02-04 10:58:53 +0000 |
|---|---|---|
| committer | Francesco Potortì | 2003-02-04 10:58:53 +0000 |
| commit | 693ff6134cb2ec65c7d188696f012662edadfbf0 (patch) | |
| tree | baaf7908243e1d68df020606c09b403e629a2d41 | |
| parent | 7a0a7714a8ece2472e81d53ae82a348e29c21de4 (diff) | |
| download | emacs-693ff6134cb2ec65c7d188696f012662edadfbf0.tar.gz emacs-693ff6134cb2ec65c7d188696f012662edadfbf0.zip | |
(rmail-output): If preserving MIME-version, preserve Content-type too.
| -rw-r--r-- | lisp/mail/rmailout.el | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index d135ad193b3..e23f73a9db2 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el | |||
| @@ -225,13 +225,13 @@ mesasge up instead of moving forward to the next non-deleted message." | |||
| 225 | (if redelete (rmail-set-attribute "deleted" t)))) | 225 | (if redelete (rmail-set-attribute "deleted" t)))) |
| 226 | (setq count (1- count)) | 226 | (setq count (1- count)) |
| 227 | (if rmail-delete-after-output | 227 | (if rmail-delete-after-output |
| 228 | (unless | 228 | (unless |
| 229 | (if (and (= count 0) stay) | 229 | (if (and (= count 0) stay) |
| 230 | (rmail-delete-message) | 230 | (rmail-delete-message) |
| 231 | (rmail-delete-forward)) | 231 | (rmail-delete-forward)) |
| 232 | (setq count 0)) | 232 | (setq count 0)) |
| 233 | (if (> count 0) | 233 | (if (> count 0) |
| 234 | (unless | 234 | (unless |
| 235 | (if (not stay) (rmail-next-undeleted-message 1)) | 235 | (if (not stay) (rmail-next-undeleted-message 1)) |
| 236 | (setq count 0))))))) | 236 | (setq count 0))))))) |
| 237 | 237 | ||
| @@ -246,7 +246,7 @@ mesasge up instead of moving forward to the next non-deleted message." | |||
| 246 | ;; NOT-RMAIL if t means this buffer does not have the full header | 246 | ;; NOT-RMAIL if t means this buffer does not have the full header |
| 247 | ;; and *** EOOH *** that a message in an Rmail file has. | 247 | ;; and *** EOOH *** that a message in an Rmail file has. |
| 248 | (defun rmail-delete-unwanted-fields (&optional not-rmail) | 248 | (defun rmail-delete-unwanted-fields (&optional not-rmail) |
| 249 | (if rmail-fields-not-to-output | 249 | (if rmail-fields-not-to-output |
| 250 | (save-excursion | 250 | (save-excursion |
| 251 | (goto-char (point-min)) | 251 | (goto-char (point-min)) |
| 252 | ;; Find the end of the header. | 252 | ;; Find the end of the header. |
| @@ -296,14 +296,14 @@ The optional fourth argument FROM-GNUS is set when called from GNUS." | |||
| 296 | (tembuf (get-buffer-create " rmail-output")) | 296 | (tembuf (get-buffer-create " rmail-output")) |
| 297 | (original-headers-p | 297 | (original-headers-p |
| 298 | (and (not from-gnus) | 298 | (and (not from-gnus) |
| 299 | (save-excursion | 299 | (save-excursion |
| 300 | (save-restriction | 300 | (save-restriction |
| 301 | (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max)) | 301 | (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max)) |
| 302 | (goto-char (point-min)) | 302 | (goto-char (point-min)) |
| 303 | (forward-line 1) | 303 | (forward-line 1) |
| 304 | (= (following-char) ?0))))) | 304 | (= (following-char) ?0))))) |
| 305 | header-beginning | 305 | header-beginning |
| 306 | mail-from mime-version) | 306 | mail-from mime-version content-type) |
| 307 | (while (> count 0) | 307 | (while (> count 0) |
| 308 | ;; Preserve the Mail-From and MIME-Version fields | 308 | ;; Preserve the Mail-From and MIME-Version fields |
| 309 | ;; even if they have been pruned. | 309 | ;; even if they have been pruned. |
| @@ -315,11 +315,10 @@ The optional fourth argument FROM-GNUS is set when called from GNUS." | |||
| 315 | (setq header-beginning (point)) | 315 | (setq header-beginning (point)) |
| 316 | (search-forward "\n*** EOOH ***\n") | 316 | (search-forward "\n*** EOOH ***\n") |
| 317 | (narrow-to-region header-beginning (point)) | 317 | (narrow-to-region header-beginning (point)) |
| 318 | (setq mail-from | 318 | (setq mail-from (mail-fetch-field "Mail-From")) |
| 319 | (mail-fetch-field "Mail-From") | 319 | (unless rmail-enable-mime |
| 320 | mime-version | 320 | (setq mime-version (mail-fetch-field "MIME-Version") |
| 321 | (unless rmail-enable-mime | 321 | content-type (mail-fetch-field "Content-type")))))) |
| 322 | (mail-fetch-field "MIME-Version")))))) | ||
| 323 | (save-excursion | 322 | (save-excursion |
| 324 | (set-buffer tembuf) | 323 | (set-buffer tembuf) |
| 325 | (erase-buffer) | 324 | (erase-buffer) |
| @@ -350,7 +349,8 @@ The optional fourth argument FROM-GNUS is set when called from GNUS." | |||
| 350 | "unknown")) | 349 | "unknown")) |
| 351 | " " (current-time-string) "\n")) | 350 | " " (current-time-string) "\n")) |
| 352 | (if mime-version | 351 | (if mime-version |
| 353 | (insert "MIME-Version: " mime-version "\n")) | 352 | (insert "MIME-Version: " mime-version |
| 353 | "\nContent-type: " content-type "\n")) | ||
| 354 | ;; ``Quote'' "\nFrom " as "\n>From " | 354 | ;; ``Quote'' "\nFrom " as "\n>From " |
| 355 | ;; (note that this isn't really quoting, as there is no requirement | 355 | ;; (note that this isn't really quoting, as there is no requirement |
| 356 | ;; that "\n[>]+From " be quoted in the same transparent way.) | 356 | ;; that "\n[>]+From " be quoted in the same transparent way.) |
| @@ -374,7 +374,7 @@ The optional fourth argument FROM-GNUS is set when called from GNUS." | |||
| 374 | (if (and next-message-p original-headers-p) | 374 | (if (and next-message-p original-headers-p) |
| 375 | (rmail-toggle-header)) | 375 | (rmail-toggle-header)) |
| 376 | (if (and (> count 0) (not next-message-p)) | 376 | (if (and (> count 0) (not next-message-p)) |
| 377 | (progn | 377 | (progn |
| 378 | (error | 378 | (error |
| 379 | (save-excursion | 379 | (save-excursion |
| 380 | (set-buffer rmailbuf) | 380 | (set-buffer rmailbuf) |