Mercurial > emacs
comparison lisp/gnus/mml.el @ 78673:a296c3e20ccc
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 246-247)
- Update from CVS
2007-08-23 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/mml.el (mml-generate-mime): Make sure it uses multibyte temp buffer.
(mml-generate-mime-1): Don't encode body if it is specified to be in
raw form; don't make buffer be unibyte when inserting multibyte string.
2007-08-24 IRIE Tetsuya <irie@t.email.ne.jp> (tiny change)
* man/message.texi (MIME): Replace mml-attach with mml-attach-file.
Revision: emacs@sv.gnu.org/emacs--rel--22--patch-100
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 27 Aug 2007 04:01:49 +0000 |
parents | 24202b793a08 |
children | 1cb31606209f a3c27999decb b83d0dadb2a7 |
comparison
equal
deleted
inserted
replaced
78672:24374b4e3454 | 78673:a296c3e20ccc |
---|---|
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))) |