summaryrefslogtreecommitdiff
path: root/lisp/gnus/mml.el
diff options
context:
space:
mode:
authorKatsumi Yamaoka <yamaoka@jpl.org>2011-12-01 04:55:39 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2011-12-01 04:55:39 +0000
commitf65bd83340979074157d53c8b162340ae9954fb4 (patch)
tree29e6748ebb3e13891af0fcaaa367b2a747d71e22 /lisp/gnus/mml.el
parent1bbe96b252f080bd9782d140673bf7f54ced9eea (diff)
downloademacs-f65bd83340979074157d53c8b162340ae9954fb4.tar.gz
Gnus: Share the value of the buffer-local `message-options' variable between a draft buffer and temprary working buffers.
Diffstat (limited to 'lisp/gnus/mml.el')
-rw-r--r--lisp/gnus/mml.el21
1 files changed, 13 insertions, 8 deletions
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 8aa5fbff6b8..867c3be4b60 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -466,16 +466,21 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
(defun mml-generate-mime ()
"Generate a MIME message based on the current MML document."
(let ((cont (mml-parse))
- (mml-multipart-number mml-multipart-number))
+ (mml-multipart-number mml-multipart-number)
+ (options message-options))
(if (not cont)
nil
- (mm-with-multibyte-buffer
- (if (and (consp (car cont))
- (= (length cont) 1))
- (mml-generate-mime-1 (car cont))
- (mml-generate-mime-1 (nconc (list 'multipart '(type . "mixed"))
- cont)))
- (buffer-string)))))
+ (prog1
+ (mm-with-multibyte-buffer
+ (setq message-options options)
+ (if (and (consp (car cont))
+ (= (length cont) 1))
+ (mml-generate-mime-1 (car cont))
+ (mml-generate-mime-1 (nconc (list 'multipart '(type . "mixed"))
+ cont)))
+ (setq options message-options)
+ (buffer-string))
+ (setq message-options options)))))
(defun mml-generate-mime-1 (cont)
(let ((mm-use-ultra-safe-encoding