changeset 1230:78781398fc4c

[xemacs-hg @ 2003-01-23 10:09:41 by michaels] 2003-01-10 Mike Sperber <mike@xemacs.org> * window-xemacs.el: Revert his change 2003-01-10 Mike Sperber <mike@xemacs.org> * window-xemacs.el (window-reduce-to-one): Rewrite in terms of `delete-other-windows.' (window-find-buffer-subwindow): Add. It caused subtle breakage. (And add a comment to that effect.)
author michaels
date Thu, 23 Jan 2003 10:09:41 +0000
parents 416490619c01
children 3f6adebda25c
files lisp/ChangeLog lisp/window-xemacs.el
diffstat 2 files changed, 41 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jan 23 02:16:42 2003 +0000
+++ b/lisp/ChangeLog	Thu Jan 23 10:09:41 2003 +0000
@@ -1,3 +1,30 @@
+2003-01-10  Mike Sperber  <mike@xemacs.org>
+
+	* window-xemacs.el: Revert his change
+	
+		2003-01-10  Mike Sperber  <mike@xemacs.org>
+
+		* window-xemacs.el (window-reduce-to-one): Rewrite in terms of
+		`delete-other-windows.'
+		(window-find-buffer-subwindow): Add.
+
+	It caused subtle breakage.  (And add a comment to that effect.)
+	
+2003-01-13  Mike Sperber <mike@xemacs.org>
+
+	* packages.el: 
+	* find-paths.el: Revert this change
+
+		2000-04-01  Mike Sperber  <mike@xemacs.org>
+
+		* packages.el (packages-find-package-directories): Added support
+		for external package hierarchies with in-place installations.
+
+		* find-paths.el (paths-root-in-place-p): Added.
+		(paths-find-emacs-directory): Added support for external
+		directories with in-place installations.
+		(paths-find-site-directory): Ditto.
+
 2003-01-19  Mike Sperber  <mike@xemacs.org>
 
 	* startup.el (normal-top-level): Compute `emacs-data-roots.'  Call
--- a/lisp/window-xemacs.el	Thu Jan 23 02:16:42 2003 +0000
+++ b/lisp/window-xemacs.el	Thu Jan 23 10:09:41 2003 +0000
@@ -325,18 +325,22 @@
     (if combination-start
 	(window-reduce-to-one combination-start))))
 
+;; Note that simply using `delete-other-windows' causes obscure
+;; breakage. --Mike
+
 (defun window-reduce-to-one (window)
   "Make sure only one subwindow of WINDOW is left."
-  (let ((buffer-window (window-find-buffer-subwindow window)))
-    (delete-other-windows buffer-window)))
-
-(defun window-find-buffer-subwindow (window)
-  "Find a subwindow of window which contains a buffer."
-  (while (not (window-buffer window))
-    (if (window-first-vchild window)
-	(setq window (window-first-vchild window))
-      (setq window (window-first-hchild window))))
-  window)
+  (let ((window (window-next-child window)))
+    (while window
+      (if (window-live-p window)
+	  (let ((next (window-next-child window)))
+	    (delete-window window)
+	    (setq window next)))))
+  (cond
+   ((window-first-hchild window)
+    (window-reduce-to-one (window-first-hchild window)))
+   ((window-first-vchild window)
+    (window-reduce-to-one (window-first-vchild window)))))
 
 (defun restore-saved-window (configuration window saved-window direction)
   "Within CONFIGURATION, restore WINDOW to the state of SAVED-WINDOW."