summaryrefslogtreecommitdiff
path: root/lisp/gnus/mml.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/mml.el')
-rw-r--r--lisp/gnus/mml.el23
1 files changed, 14 insertions, 9 deletions
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 352fa329e3e..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
@@ -1454,7 +1459,7 @@ Should be adopted if code in `message-send-mail' is changed."
"Display current buffer with Gnus, in a new buffer.
If RAW, display a raw encoded MIME message.
-The window layout for the preview buffer is controled by the variables
+The window layout for the preview buffer is controlled by the variables
`special-display-buffer-names', `special-display-regexps', or
`gnus-buffer-configuration' (the first match made will be used),
or the `pop-to-buffer' function."