[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/gnus/mml.el
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/gnus/mml.el |
Date: |
Sat, 30 Jul 2005 20:12:24 -0400 |
Index: emacs/lisp/gnus/mml.el
diff -c emacs/lisp/gnus/mml.el:1.26 emacs/lisp/gnus/mml.el:1.27
*** emacs/lisp/gnus/mml.el:1.26 Thu Jul 21 19:08:30 2005
--- emacs/lisp/gnus/mml.el Sun Jul 31 00:12:23 2005
***************
*** 123,129 ****
with unknown encoding; `multipart': always send messages with more than
one charsets.")
! (defvar mml-generate-default-type "text/plain")
(defvar mml-buffer-list nil)
--- 123,135 ----
with unknown encoding; `multipart': always send messages with more than
one charsets.")
! (defvar mml-generate-default-type "text/plain"
! "Content type by which the Content-Type header can be omitted.
! The Content-Type header will not be put in the MIME part if the type
! equals the value and there's no parameter (e.g. charset, format, etc.)
! and `mml-insert-mime-headers-always' is nil. The value will be bound
! to \"message/rfc822\" when encoding an article to be forwarded as a MIME
! part. This is for the internal use, you should never modify the value.")
(defvar mml-buffer-list nil)
***************
*** 400,408 ****
(mml-tweak-part cont)
(cond
((or (eq (car cont) 'part) (eq (car cont) 'mml))
! (let ((raw (cdr (assq 'raw cont)))
! coded encoding charset filename type flowed)
! (setq type (or (cdr (assq 'type cont)) "text/plain"))
(if (and (not raw)
(member (car (split-string type "/")) '("text" "message")))
(progn
--- 406,417 ----
(mml-tweak-part cont)
(cond
((or (eq (car cont) 'part) (eq (car cont) 'mml))
! (let* ((raw (cdr (assq 'raw cont)))
! (filename (cdr (assq 'filename cont)))
! (type (or (cdr (assq 'type cont))
! (and filename (mm-default-file-encoding filename))
! "application/octet-stream"))
! coded encoding charset flowed)
(if (and (not raw)
(member (car (split-string type "/")) '("text" "message")))
(progn
***************
*** 414,420 ****
(cond
((cdr (assq 'buffer cont))
(insert-buffer-substring (cdr (assq 'buffer cont))))
! ((and (setq filename (cdr (assq 'filename cont)))
(not (equal (cdr (assq 'nofile cont)) "yes")))
(let ((coding-system-for-read charset))
(mm-insert-file-contents filename)))
--- 423,429 ----
(cond
((cdr (assq 'buffer cont))
(insert-buffer-substring (cdr (assq 'buffer cont))))
! ((and filename
(not (equal (cdr (assq 'nofile cont)) "yes")))
(let ((coding-system-for-read charset))
(mm-insert-file-contents filename)))
***************
*** 434,439 ****
--- 443,452 ----
(cond
((eq (car cont) 'mml)
(let ((mml-boundary (mml-compute-boundary cont))
+ ;; It is necessary for the case where this
+ ;; function is called recursively since
+ ;; `m-g-d-t' will be bound to "message/rfc822"
+ ;; when encoding an article to be forwarded.
(mml-generate-default-type "text/plain"))
(mml-to-mime))
(let ((mm-7bit-chars (concat mm-7bit-chars "\x1b")))
***************
*** 475,481 ****
(insert (with-current-buffer (cdr (assq 'buffer cont))
(mm-with-unibyte-current-buffer
(buffer-string)))))
! ((and (setq filename (cdr (assq 'filename cont)))
(not (equal (cdr (assq 'nofile cont)) "yes")))
(let ((coding-system-for-read mm-binary-coding-system))
(mm-insert-file-contents filename nil nil nil nil t)))
--- 488,494 ----
(insert (with-current-buffer (cdr (assq 'buffer cont))
(mm-with-unibyte-current-buffer
(buffer-string)))))
! ((and filename
(not (equal (cdr (assq 'nofile cont)) "yes")))
(let ((coding-system-for-read mm-binary-coding-system))
(mm-insert-file-contents filename nil nil nil nil t)))
***************
*** 516,530 ****
"access-type=url"))
(when parameters
(mml-insert-parameter-string
! cont '(expiration size permission))))
! (insert "\n\n")
! (insert "Content-Type: " (cdr (assq 'type cont)) "\n")
! (insert "Content-ID: " (message-make-message-id) "\n")
! (insert "Content-Transfer-Encoding: "
! (or (cdr (assq 'encoding cont)) "binary"))
! (insert "\n\n")
! (insert (or (cdr (assq 'contents cont))))
! (insert "\n"))
((eq (car cont) 'multipart)
(let* ((type (or (cdr (assq 'type cont)) "mixed"))
(mml-generate-default-type (if (equal type "digest")
--- 529,547 ----
"access-type=url"))
(when parameters
(mml-insert-parameter-string
! cont '(expiration size permission)))
! (insert "\n\n")
! (insert "Content-Type: "
! (or (cdr (assq 'type cont))
! (and name (mm-default-file-encoding name))
! "application/octet-stream")
! "\n")
! (insert "Content-ID: " (message-make-message-id) "\n")
! (insert "Content-Transfer-Encoding: "
! (or (cdr (assq 'encoding cont)) "binary"))
! (insert "\n\n")
! (insert (or (cdr (assq 'contents cont))))
! (insert "\n")))
((eq (car cont) 'multipart)
(let* ((type (or (cdr (assq 'type cont)) "mixed"))
(mml-generate-default-type (if (equal type "digest")
***************
*** 560,566 ****
(message-options-set 'message-sender sender))
(if (setq recipients (cdr (assq 'recipients cont)))
(message-options-set 'message-recipients recipients))
! (let ((style (mml-signencrypt-style (first (or sign-item
encrypt-item)))))
;; check if: we're both signing & encrypting, both methods
;; are the same (why would they be different?!), and that
;; the signencrypt style allows for combined operation.
--- 577,584 ----
(message-options-set 'message-sender sender))
(if (setq recipients (cdr (assq 'recipients cont)))
(message-options-set 'message-recipients recipients))
! (let ((style (mml-signencrypt-style
! (first (or sign-item encrypt-item)))))
;; check if: we're both signing & encrypting, both methods
;; are the same (why would they be different?!), and that
;; the signencrypt style allows for combined operation.