Mercurial > emacs
comparison lisp/gnus/mml.el @ 90294:c5406394f567
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-13
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 43-57)
- Update from CVS
- Merge from erc--emacs--0
- Make constrain-to-field notice overlays
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 18-21)
- Update from CVS
- Merge from emacs--devo--0
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 08 Feb 2006 04:26:44 +0000 |
parents | d6f8fe3307c8 d9dde5b81e71 |
children | 5754737d1e04 |
comparison
equal
deleted
inserted
replaced
90293:275e0a144c1d | 90294:c5406394f567 |
---|---|
661 (when (consp charset) | 661 (when (consp charset) |
662 (error | 662 (error |
663 "Can't encode a part with several charsets")) | 663 "Can't encode a part with several charsets")) |
664 (insert "Content-Type: " type) | 664 (insert "Content-Type: " type) |
665 (when charset | 665 (when charset |
666 (insert "; " (mail-header-encode-parameter | 666 (mml-insert-parameter |
667 "charset" (symbol-name charset)))) | 667 (mail-header-encode-parameter "charset" (symbol-name charset)))) |
668 (when flowed | 668 (when flowed |
669 (insert "; format=flowed")) | 669 (mml-insert-parameter "format=flowed")) |
670 (when parameters | 670 (when parameters |
671 (mml-insert-parameter-string | 671 (mml-insert-parameter-string |
672 cont mml-content-type-parameters)) | 672 cont mml-content-type-parameters)) |
673 (insert "\n")) | 673 (insert "\n")) |
674 (when (setq id (cdr (assq 'id cont))) | 674 (when (setq id (cdr (assq 'id cont))) |
684 cont mml-content-disposition-parameters)) | 684 cont mml-content-disposition-parameters)) |
685 (insert "\n")) | 685 (insert "\n")) |
686 (unless (eq encoding '7bit) | 686 (unless (eq encoding '7bit) |
687 (insert (format "Content-Transfer-Encoding: %s\n" encoding))) | 687 (insert (format "Content-Transfer-Encoding: %s\n" encoding))) |
688 (when (setq description (cdr (assq 'description cont))) | 688 (when (setq description (cdr (assq 'description cont))) |
689 (insert "Content-Description: " | 689 (insert "Content-Description: ") |
690 (mail-encode-encoded-word-string description) "\n")))) | 690 (setq description (prog1 |
691 (point) | |
692 (insert description "\n"))) | |
693 (mail-encode-encoded-word-region description (point))))) | |
691 | 694 |
692 (defun mml-parameter-string (cont types) | 695 (defun mml-parameter-string (cont types) |
693 (let ((string "") | 696 (let ((string "") |
694 value type) | 697 value type) |
695 (while (setq type (pop types)) | 698 (while (setq type (pop types)) |
838 (insert " description=\"" (mm-handle-description handle) "\"")) | 841 (insert " description=\"" (mm-handle-description handle) "\"")) |
839 (insert ">\n"))) | 842 (insert ">\n"))) |
840 | 843 |
841 (defun mml-insert-parameter (&rest parameters) | 844 (defun mml-insert-parameter (&rest parameters) |
842 "Insert PARAMETERS in a nice way." | 845 "Insert PARAMETERS in a nice way." |
843 (dolist (param parameters) | 846 (let (start end) |
844 (insert ";") | 847 (dolist (param parameters) |
845 (let ((point (point))) | 848 (insert ";") |
849 (setq start (point)) | |
846 (insert " " param) | 850 (insert " " param) |
847 (when (> (current-column) 71) | 851 (setq end (point)) |
848 (goto-char point) | 852 (goto-char start) |
849 (insert "\n ") | 853 (end-of-line) |
850 (end-of-line))))) | 854 (if (> (current-column) 76) |
855 (progn | |
856 (goto-char start) | |
857 (insert "\n") | |
858 (goto-char (1+ end))) | |
859 (goto-char end))))) | |
851 | 860 |
852 ;;; | 861 ;;; |
853 ;;; Mode for inserting and editing MML forms | 862 ;;; Mode for inserting and editing MML forms |
854 ;;; | 863 ;;; |
855 | 864 |