changeset 94133:b41935af6fe9

(cvs-bury-buffer): Use quit-window instead of the idiosyncratic bury-buffer/delete-window logic.
author Sam Steingold <sds@gnu.org>
date Thu, 17 Apr 2008 13:44:00 +0000
parents 5818ab6c0a59
children 29e80ebed169
files lisp/ChangeLog lisp/pcvs-util.el
diffstat 2 files changed, 6 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Apr 17 09:50:05 2008 +0000
+++ b/lisp/ChangeLog	Thu Apr 17 13:44:00 2008 +0000
@@ -1,3 +1,8 @@
+2008-04-17  Sam Steingold  <sds@gnu.org>
+
+	* pcvs-util.el (cvs-bury-buffer): Use quit-window instead of the
+	idiosyncratic bury-buffer/delete-window logic.
+
 2008-04-17  Juanma Barranquero  <lekktu@gmail.com>
 
 	* emacs-lisp/crm.el (crm-completion-help, crm-complete)
--- a/lisp/pcvs-util.el	Thu Apr 17 09:50:05 2008 +0000
+++ b/lisp/pcvs-util.el	Thu Apr 17 13:44:00 2008 +0000
@@ -102,20 +102,7 @@
     (let ((win (if (eq buf (window-buffer (selected-window))) (selected-window)
 		 (get-buffer-window buf t))))
       (when 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)))
+        (quit-window nil win)))
     (when mainbuf
       (let ((mainwin (or (get-buffer-window mainbuf)
 			 (get-buffer-window mainbuf 'visible))))