Mercurial > hg > xemacs-beta
changeset 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 | 11357f7846bf |
children | f4eb31866c38 9c1cfceab252 |
files | lisp/ChangeLog lisp/window-xemacs.el |
diffstat | 2 files changed, 22 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Mar 11 23:15:08 2008 -0700 +++ b/lisp/ChangeLog Wed Mar 12 19:37:49 2008 +0100 @@ -1,3 +1,9 @@ +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. + 2008-03-07 Michael Sperber <mike@xemacs.org> * gnuserv.el (gnuserv-temp-file-regexp): Quote the temp-directory
--- 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."