[gnus git] branch master updated: n0-17-412-geb1db9d =1= Share the value of the buffer-local `message-options' variable between a draft buffer and temprary working buffers.
Katsumi Yamaoka <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via eb1db9d188ee90635731a93c0769872ca59b29c0 (commit)
from 07f959536376e60fdd78137bfabb935433a9a7a2 (commit)
- Log -----------------------------------------------------------------
commit eb1db9d188ee90635731a93c0769872ca59b29c0
Author: Katsumi Yamaoka <[email protected]>
Date: Thu Dec 1 04:55:11 2011 +0000
Share the value of the buffer-local `message-options' variable between a draft buffer and temprary working buffers.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e4b4423..cc76699 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-01 Katsumi Yamaoka <[email protected]>
+
+ * gnus-msg.el (gnus-inews-do-gcc):
+ * message.el (message-send-mail):
+ * mml.el (mml-generate-mime): Share the value of the buffer-local
+ `message-options' variable between a draft buffer and temprary working
+ buffers.
+
2011-11-30 Stefan Monnier <[email protected]>
* message.el (message-pop-to-buffer): Revert 2011-09-11 change.
diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el
index e6a06a0..e06d475 100644
--- a/lisp/gnus-msg.el
+++ b/lisp/gnus-msg.el
@@ -1549,7 +1549,7 @@ this is a reply."
(message-narrow-to-headers)
(let ((gcc (or gcc (mail-fetch-field "gcc" nil t)))
(cur (current-buffer))
- groups group method group-art
+ groups group method group-art options
mml-externalize-attachments)
(when gcc
(message-remove-header "gcc")
@@ -1573,6 +1573,7 @@ this is a reply."
gnus-gcc-externalize-attachments))
(save-excursion
(nnheader-set-temp-buffer " *acc*")
+ (setq message-options (with-current-buffer cur message-options))
(insert-buffer-substring cur)
(message-encode-message-body)
(save-restriction
@@ -1629,6 +1630,8 @@ this is a reply."
(boundp 'gnus-inews-mark-gcc-as-read)
(symbol-value 'gnus-inews-mark-gcc-as-read))))
(gnus-group-mark-article-read group (cdr group-art)))
+ (setq options message-options)
+ (with-current-buffer cur (setq message-options options))
(kill-buffer (current-buffer)))))))))
(defun gnus-inews-insert-gcc (&optional group)
diff --git a/lisp/message.el b/lisp/message.el
index e0a8f20..3a2e1b9 100644
--- a/lisp/message.el
+++ b/lisp/message.el
@@ -4551,7 +4551,8 @@ This function could be useful in `message-setup-hook'."
(boundp 'gnus-group-posting-charset-alist))
(gnus-setup-posting-charset nil)
message-posting-charset))
- (headers message-required-mail-headers))
+ (headers message-required-mail-headers)
+ options)
(when (and message-generate-hashcash
(not (eq message-generate-hashcash 'opportunistic)))
(message "Generating hashcash...")
@@ -4590,9 +4591,11 @@ This function could be useful in `message-setup-hook'."
(error "Failed to send the message")))))
;; Let the user do all of the above.
(run-hooks 'message-header-hook))
+ (setq options message-options)
(unwind-protect
(with-current-buffer tembuf
(erase-buffer)
+ (setq message-options options)
;; Avoid copying text props (except hard newlines).
(insert (with-current-buffer mailbuf
(mml-buffer-substring-no-properties-except-hard-newlines
@@ -4674,9 +4677,11 @@ If you always want Gnus to send messages in one piece, set
(message "Sending via mail...")
(funcall (or message-send-mail-real-function
message-send-mail-function)))
- (message-send-mail-partially)))
+ (message-send-mail-partially))
+ (setq options message-options))
(kill-buffer tembuf))
(set-buffer mailbuf)
+ (setq message-options options)
(push 'mail message-sent-message-via)))
(defvar sendmail-program)
diff --git a/lisp/mml.el b/lisp/mml.el
index 8aa5fbf..867c3be 100644
--- a/lisp/mml.el
+++ b/lisp/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
+ (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)))
- (buffer-string)))))
+ (setq options message-options)
+ (buffer-string))
+ (setq message-options options)))))
(defun mml-generate-mime-1 (cont)
(let ((mm-use-ultra-safe-encoding
-----------------------------------------------------------------------
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 | 8 ++++++++
lisp/gnus-msg.el | 5 ++++-
lisp/message.el | 9 +++++++--
lisp/mml.el | 21 +++++++++++++--------
4 files changed, 32 insertions(+), 11 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