[gnus git] branch master updated: n0-17-323-g29054f0 =1= mml.el (mml-inhibit-compute-boundary): New internal variable. (mml-compute-boundary): Don't check collision if it is non-nil. (mml-compute-boundary-1): Use mml-generate-mime-1 to encode part before checking collision.
Katsumi Yamaoka <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 29054f0fa0ecc9dac54ad2bba4736ea187c229a2 (commit)
from 1755f6d1a199e6c6a3b69be291dfcf550ff68ae3 (commit)
- Log -----------------------------------------------------------------
commit 29054f0fa0ecc9dac54ad2bba4736ea187c229a2
Author: Katsumi Yamaoka <[email protected]>
Date: Thu Sep 22 04:42:45 2011 +0000
mml.el (mml-inhibit-compute-boundary): New internal variable.
(mml-compute-boundary): Don't check collision if it is non-nil.
(mml-compute-boundary-1): Use mml-generate-mime-1 to encode part before checking collision.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1984ead..6845320 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-22 Katsumi Yamaoka <[email protected]>
+
+ * mml.el (mml-inhibit-compute-boundary): New internal variable.
+ (mml-compute-boundary): Don't check collision if it is non-nil.
+ (mml-compute-boundary-1): Use mml-generate-mime-1 to encode part
+ before checking collision.
+
2011-09-21 Lars Magne Ingebrigtsen <[email protected]>
* message.el (message-indent-citation): Really make sure there's a
diff --git a/lisp/mml.el b/lisp/mml.el
index e393918..d986139 100644
--- a/lisp/mml.el
+++ b/lisp/mml.el
@@ -461,6 +461,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
(defvar mml-boundary nil)
(defvar mml-base-boundary "-=-=")
(defvar mml-multipart-number 0)
+(defvar mml-inhibit-compute-boundary nil)
(defun mml-generate-mime ()
"Generate a MIME message based on the current MML document."
@@ -710,25 +711,21 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
"Return a unique boundary that does not exist in CONT."
(let ((mml-boundary (funcall mml-boundary-function
(incf mml-multipart-number))))
+ (unless mml-inhibit-compute-boundary
;; This function tries again and again until it has found
;; a unique boundary.
(while (not (catch 'not-unique
- (mml-compute-boundary-1 cont))))
+ (mml-compute-boundary-1 cont)))))
mml-boundary))
(defun mml-compute-boundary-1 (cont)
- (let (filename)
(cond
((member (car cont) '(part mml))
- (with-temp-buffer
- (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")))
- (mm-insert-file-contents filename nil nil nil nil t))
- (t
- (insert (cdr (assq 'contents cont)))))
+ (mm-with-multibyte-buffer
+ (let ((mml-inhibit-compute-boundary t)
+ (mml-multipart-number 0)
+ mml-sign-alist mml-encrypt-alist)
+ (mml-generate-mime-1 cont))
(goto-char (point-min))
(when (re-search-forward (concat "^--" (regexp-quote mml-boundary))
nil t)
@@ -737,7 +734,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
(throw 'not-unique nil))))
((eq (car cont) 'multipart)
(mapc 'mml-compute-boundary-1 (cddr cont))))
- t))
+ t)
(defun mml-make-boundary (number)
(concat (make-string (% number 60) ?=)
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 7 +++++++
lisp/mml.el | 47 ++++++++++++++++++++++-------------------------
2 files changed, 29 insertions(+), 25 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project