]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/gnus/gnus-msg.el (gnus-msg-mail): Buffer-local warning fix (bug#19573)
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 13 Feb 2015 08:16:39 +0000 (08:16 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 13 Feb 2015 08:16:39 +0000 (08:16 +0000)
lisp/gnus/ChangeLog
lisp/gnus/gnus-msg.el

index 9ff191d05c0ffe24eecdbac6fa17a85e6cae5b2b..67929a30186fa396c9eb66975ec5d15f552fbb47 100644 (file)
@@ -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'.
 
index 6c80c0daca6cb9e0748a409cd87dc27f692d02c8..bfd3da2e69dbf4a9ee3b52805189dc75c6c1c7ee 100644 (file)
@@ -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)