Mercurial > emacs
comparison lisp/gnus/mml.el @ 82907:92ccd83174e6
Merge from emacs--rel--22
Patches applied:
* emacs--rel--22 (patch 97-100)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 246-247)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-860
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 27 Aug 2007 04:00:19 +0000 |
parents | 24202b793a08 |
children | 1cb31606209f a3c27999decb b83d0dadb2a7 |
comparison
equal
deleted
inserted
replaced
82906:69b183268e31 | 82907:92ccd83174e6 |
---|---|
402 "Generate a MIME message based on the current MML document." | 402 "Generate a MIME message based on the current MML document." |
403 (let ((cont (mml-parse)) | 403 (let ((cont (mml-parse)) |
404 (mml-multipart-number mml-multipart-number)) | 404 (mml-multipart-number mml-multipart-number)) |
405 (if (not cont) | 405 (if (not cont) |
406 nil | 406 nil |
407 (with-temp-buffer | 407 (mm-with-multibyte-buffer |
408 (if (and (consp (car cont)) | 408 (if (and (consp (car cont)) |
409 (= (length cont) 1)) | 409 (= (length cont) 1)) |
410 (mml-generate-mime-1 (car cont)) | 410 (mml-generate-mime-1 (car cont)) |
411 (mml-generate-mime-1 (nconc (list 'multipart '(type . "mixed")) | 411 (mml-generate-mime-1 (nconc (list 'multipart '(type . "mixed")) |
412 cont))) | 412 cont))) |
514 (string-match "[^\000-\377]" contents) | 514 (string-match "[^\000-\377]" contents) |
515 (mm-multibyte-string-p contents)) | 515 (mm-multibyte-string-p contents)) |
516 (progn | 516 (progn |
517 (mm-enable-multibyte) | 517 (mm-enable-multibyte) |
518 (insert contents) | 518 (insert contents) |
519 (setq charset (mm-encode-body))) | 519 (unless raw |
520 (setq charset (mm-encode-body)))) | |
520 (insert contents))))) | 521 (insert contents))))) |
521 (setq encoding (mm-encode-buffer type) | 522 (setq encoding (mm-encode-buffer type) |
522 coded (mm-string-as-multibyte (buffer-string)))) | 523 coded (mm-string-as-multibyte (buffer-string)))) |
523 (mml-insert-mime-headers cont type charset encoding nil) | 524 (mml-insert-mime-headers cont type charset encoding nil) |
524 (insert "\n") | 525 (insert "\n" coded)))) |
525 (mm-with-unibyte-current-buffer | |
526 (insert coded))))) | |
527 ((eq (car cont) 'external) | 526 ((eq (car cont) 'external) |
528 (insert "Content-Type: message/external-body") | 527 (insert "Content-Type: message/external-body") |
529 (let ((parameters (mml-parameter-string | 528 (let ((parameters (mml-parameter-string |
530 cont '(expiration size permission))) | 529 cont '(expiration size permission))) |
531 (name (cdr (assq 'name cont))) | 530 (name (cdr (assq 'name cont))) |