(gnus-inews-add-send-actions): Restore the winconf name after exit.
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 22 Feb 2011 02:59:44 +0000 (18:59 -0800)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 22 Feb 2011 02:59:44 +0000 (18:59 -0800)
lisp/ChangeLog
lisp/gnus-msg.el

index 3b01f95..2fb29bc 100644 (file)
@@ -1,5 +1,8 @@
 2011-02-22  Lars Ingebrigtsen  <larsi@gnus.org>
 
 2011-02-22  Lars Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-msg.el (gnus-inews-add-send-actions): Restore the winconf name
+       after exit.
+
        * gnus-sum.el (gnus-summary-show-article): When called with t as the
        value, show the raw article.
 
        * gnus-sum.el (gnus-summary-show-article): When called with t as the
        value, show the raw article.
 
index b199dcc..29ac431 100644 (file)
@@ -388,6 +388,7 @@ Thank you for your help in stamping out bugs.
        (yanked (make-symbol "gnus-setup-yanked-articles"))
        (group (make-symbol "gnus-setup-message-group")))
     `(let ((,winconf (current-window-configuration))
        (yanked (make-symbol "gnus-setup-yanked-articles"))
        (group (make-symbol "gnus-setup-message-group")))
     `(let ((,winconf (current-window-configuration))
+          (,winconf-name gnus-current-window-configuration)
           (,buffer (buffer-name (current-buffer)))
           (,article gnus-article-reply)
           (,yanked gnus-article-yanked-articles)
           (,buffer (buffer-name (current-buffer)))
           (,article gnus-article-reply)
           (,yanked gnus-article-yanked-articles)
@@ -432,7 +433,7 @@ Thank you for your help in stamping out bugs.
           (progn
             ,@forms)
         (gnus-inews-add-send-actions ,winconf ,buffer ,article ,config
           (progn
             ,@forms)
         (gnus-inews-add-send-actions ,winconf ,buffer ,article ,config
-                                     ,yanked)
+                                     ,yanked ,winconf-name)
         (setq gnus-message-buffer (current-buffer))
         (set (make-local-variable 'gnus-message-group-art)
              (cons ,group ,article))
         (setq gnus-message-buffer (current-buffer))
         (set (make-local-variable 'gnus-message-group-art)
              (cons ,group ,article))
@@ -527,7 +528,8 @@ Gcc: header for archiving purposes."
            (throw 'found (cons (cadr elem) (caddr elem)))))))))
 
 (defun gnus-inews-add-send-actions (winconf buffer article
            (throw 'found (cons (cadr elem) (caddr elem)))))))))
 
 (defun gnus-inews-add-send-actions (winconf buffer article
-                                           &optional config yanked)
+                                           &optional config yanked
+                                           winconf-name)
   (gnus-make-local-hook 'message-sent-hook)
   (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc
                                 'gnus-inews-do-gcc) nil t)
   (gnus-make-local-hook 'message-sent-hook)
   (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc
                                 'gnus-inews-do-gcc) nil t)
@@ -538,8 +540,10 @@ Gcc: header for archiving purposes."
        `(lambda (&optional arg)
           (gnus-post-method arg ,gnus-newsgroup-name)))
   (message-add-action
        `(lambda (&optional arg)
           (gnus-post-method arg ,gnus-newsgroup-name)))
   (message-add-action
-   `(when (gnus-buffer-exists-p ,buffer)
-      (set-window-configuration ,winconf))
+   `(progn
+      (setq gnus-current-window-configuration ,winconf-name)
+      (when (gnus-buffer-exists-p ,buffer)
+       (set-window-configuration ,winconf)))
    'exit 'postpone 'kill)
   (let ((to-be-marked (cond
                       (yanked
    'exit 'postpone 'kill)
   (let ((to-be-marked (cond
                       (yanked