[gnus git] branch master updated: m0-5-212-g0a7a92a =1= Allow killing off the *Tree* buffer

Lars Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  0a7a92abbb8988653228fd00d967281024a92ebc (commit)
      from  7801d80ab08cb437b2ee7a36594ef8a835d9f893 (commit)


- Log -----------------------------------------------------------------
commit 0a7a92abbb8988653228fd00d967281024a92ebc
Author: Lars Ingebrigtsen <[email protected]>
Date:   Tue Dec 25 16:21:24 2012 +0100

    Allow killing off the *Tree* buffer
    
    * gnus-salt.el (gnus-highlight-selected-tree): Check whether the Tree
    buffer exists before using it (bug#12475).

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5f4d00e..9e466e1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
 2012-12-25  Lars Ingebrigtsen  <[email protected]>
 
+	* gnus-salt.el (gnus-highlight-selected-tree): Check whether the Tree
+	buffer exists before using it (bug#12475).
+
 	* gnus-agent.el (gnus-agent-fetch-articles): Don't fetch articles from
 	offline groups (bug#11937).
 
diff --git a/lisp/gnus-salt.el b/lisp/gnus-salt.el
index 5ac2c55..cb4101b 100644
--- a/lisp/gnus-salt.el
+++ b/lisp/gnus-salt.el
@@ -828,6 +828,7 @@ Two predefined functions are available:
 
 (defun gnus-highlight-selected-tree (article)
   "Highlight the selected article in the tree."
+  (when (buffer-live-p gnus-tree-buffer)
   (let ((buf (current-buffer))
 	region)
     (set-buffer gnus-tree-buffer)
@@ -846,13 +847,14 @@ Two predefined functions are available:
       (gnus-tree-recenter)
       (let ((selected (selected-window)))
 	(when (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t)
-	  (select-window (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t))
+	    (select-window
+	     (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t))
 	  (gnus-horizontal-recenter)
 	  (select-window selected))))
-;; If we remove this save-excursion, it updates the wrong mode lines?!?
+      ;; If we remove this save-excursion, it updates the wrong mode lines?!?
     (with-current-buffer gnus-tree-buffer
       (gnus-set-mode-line 'tree))
-    (set-buffer buf)))
+      (set-buffer buf))))
 
 (defun gnus-tree-highlight-article (article face)
   (with-current-buffer (gnus-get-tree-buffer)

-----------------------------------------------------------------------
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    |    3 +++
 lisp/gnus-salt.el |   52 +++++++++++++++++++++++++++-------------------------
 2 files changed, 30 insertions(+), 25 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.