104 |
(condition-case () |
(condition-case () |
105 |
(delete-window win) |
(delete-window win) |
106 |
(error (iconify-frame (window-frame win)))) |
(error (iconify-frame (window-frame win)))) |
107 |
(if (and mainbuf (get-buffer-window mainbuf)) |
;;; (if (and mainbuf (get-buffer-window mainbuf)) |
108 |
;; FIXME: if the buffer popped into a pre-existing window, |
;;; ;; FIXME: if the buffer popped into a pre-existing window, |
109 |
;; we don't want to delete that window. |
;;; ;; we don't want to delete that window. |
110 |
t ;;(delete-window win) |
;;; t ;;(delete-window win) |
111 |
)))) |
;;; ) |
112 |
|
))) |
113 |
(with-current-buffer buf |
(with-current-buffer buf |
114 |
(bury-buffer (unless (and (eq buf (window-buffer (selected-window))) |
(bury-buffer (unless (and (eq buf (window-buffer (selected-window))) |
115 |
(not (window-dedicated-p (selected-window)))) |
(not (window-dedicated-p (selected-window)))) |