From: Lars Magne Ingebrigtsen Date: Fri, 13 Feb 2015 08:16:39 +0000 (+0000) Subject: lisp/gnus/gnus-msg.el (gnus-msg-mail): Buffer-local warning fix (bug#19573) X-Git-Tag: emacs-25.0.90~2564^2~389 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f61c87f12a36bb2063c25b6742380b5916618ab5;p=emacs.git lisp/gnus/gnus-msg.el (gnus-msg-mail): Buffer-local warning fix (bug#19573) --- 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 + * 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)