changeset 94763:ff5a0c88b6ba

(cvs-bury-buffer): Revert my patch: quit-window appears to be too aggressive with window removal.
author Sam Steingold <sds@gnu.org>
date Thu, 08 May 2008 14:51:03 +0000
parents 64e725031836
children b0f118394bb4
files lisp/ChangeLog lisp/pcvs-util.el
diffstat 2 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu May 08 14:46:34 2008 +0000
+++ b/lisp/ChangeLog	Thu May 08 14:51:03 2008 +0000
@@ -1,3 +1,8 @@
+2008-05-07  Sam Steingold  <sds@gnu.org>
+
+	* pcvs-util.el (cvs-bury-buffer): Revert my patch: quit-window
+	appears to be too aggressive with window removal.
+
 2008-05-08  Michael McNamara  <mac@mail.brushroad.com>
 
 	* verilog-mode.el (verilog-type-font-keywords): Add leda and 0in
--- a/lisp/pcvs-util.el	Thu May 08 14:46:34 2008 +0000
+++ b/lisp/pcvs-util.el	Thu May 08 14:51:03 2008 +0000
@@ -100,7 +100,20 @@
     (let ((win (if (eq buf (window-buffer (selected-window))) (selected-window)
 		 (get-buffer-window buf t))))
       (when win
-        (quit-window nil win)))
+	(if (window-dedicated-p win)
+	    (condition-case ()
+		(delete-window win)
+	      (error (iconify-frame (window-frame win))))
+;;; 	  (if (and mainbuf (get-buffer-window mainbuf))
+;;; 	      ;; FIXME: if the buffer popped into a pre-existing window,
+;;; 	      ;; we don't want to delete that window.
+;;; 	      t ;;(delete-window win)
+;;; 	      )
+	  )))
+    (with-current-buffer buf
+      (bury-buffer (unless (and (eq buf (window-buffer (selected-window)))
+				(not (window-dedicated-p (selected-window))))
+		     buf)))
     (when mainbuf
       (let ((mainwin (or (get-buffer-window mainbuf)
 			 (get-buffer-window mainbuf 'visible))))