summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2015-02-13 08:16:39 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2015-02-13 08:16:39 +0000
commitf61c87f12a36bb2063c25b6742380b5916618ab5 (patch)
tree1dfe8f67f8f604a2569f3ce822e9a2437ce080cd /lisp
parenta8f93d14cbc7a54bc09c7e4d841331588e86afa6 (diff)
downloademacs-f61c87f12a36bb2063c25b6742380b5916618ab5.tar.gz
lisp/gnus/gnus-msg.el (gnus-msg-mail): Buffer-local warning fix (bug#19573)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/gnus-msg.el12
2 files changed, 12 insertions, 4 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 9ff191d05c0..67929a30186 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,5 +1,9 @@
2015-02-13 Lars Ingebrigtsen <larsi@gnus.org>
+ * gnus-msg.el (gnus-msg-mail): Don't let-bind `gnus-newsgroup-name' so
+ that we don't get a warning when setting the buffer-local variable
+ (bug#19573).
+
* nnmail.el (nnmail-expiry-target-group): Supply the info structure to
`gnus-request-group'.
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 6c80c0daca6..bfd3da2e69d 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -541,11 +541,15 @@ instead."
nil yank-action send-actions return-action))
(let ((buf (current-buffer))
;; Don't use posting styles corresponding to any existing group.
- (gnus-newsgroup-name "")
+ (group-name gnus-newsgroup-name)
mail-buf)
- (gnus-setup-message 'message
- (message-mail to subject other-headers continue
- nil yank-action send-actions return-action))
+ (unwind-protect
+ (progn
+ (setq gnus-newsgroup-name "")
+ (gnus-setup-message 'message
+ (message-mail to subject other-headers continue
+ nil yank-action send-actions return-action)))
+ (setq gnus-newsgroup-name group-name))
(when switch-action
(setq mail-buf (current-buffer))
(switch-to-buffer buf)