Mercurial > hg > xemacs-beta
diff lisp/window-xemacs.el @ 4438:2785829fe37c
Fix window-configuration problem.
2008-03-12 Mike Sperber <mike@xemacs.org>
* window-xemacs.el (restore-saved-window): Restore window
parameters right after splitting, rather than after traversing the
other children.
author | Mike Sperber <sperber@deinprogramm.de> |
---|---|
date | Wed, 12 Mar 2008 19:37:49 +0100 |
parents | db22824aa020 |
children | 715c3ced8fa8 |
line wrap: on
line diff
--- a/lisp/window-xemacs.el Tue Mar 11 23:15:08 2008 -0700 +++ b/lisp/window-xemacs.el Wed Mar 12 19:37:49 2008 +0100 @@ -379,17 +379,21 @@ (defun restore-saved-window (configuration window saved-window direction) "Within CONFIGURATION, restore WINDOW to the state of SAVED-WINDOW." - (and (saved-window-next-child saved-window) - (not (saved-window-minibufferp (saved-window-next-child saved-window))) - (progn - (cond ((eq direction 'vertical) - (split-window window nil nil)) - ((eq direction 'horizontal) - (split-window window nil t))) - (restore-saved-window configuration - (window-next-child window) - (saved-window-next-child saved-window) - direction))) + (cond + ((and (saved-window-next-child saved-window) + (not (saved-window-minibufferp (saved-window-next-child saved-window)))) + (cond ((eq direction 'vertical) + (split-window window nil nil)) + ((eq direction 'horizontal) + (split-window window nil t))) + (if (not (saved-window-minibufferp saved-window)) + (restore-saved-window-parameters configuration window saved-window)) + (restore-saved-window configuration + (window-next-child window) + (saved-window-next-child saved-window) + direction)) + ((not (saved-window-minibufferp saved-window)) + (restore-saved-window-parameters configuration window saved-window))) (if (saved-window-first-hchild saved-window) (restore-saved-window configuration @@ -400,10 +404,7 @@ (restore-saved-window configuration window (saved-window-first-vchild saved-window) - 'vertical)) - - (if (not (saved-window-minibufferp saved-window)) - (restore-saved-window-parameters configuration window saved-window))) + 'vertical))) (defun restore-saved-window-parameters (configuration window saved-window) "Restore the window parameters stored in SAVED-WINDOW on WINDOW."