comparison 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
comparison
equal deleted inserted replaced
4437:11357f7846bf 4438:2785829fe37c
377 ((window-first-vchild window) 377 ((window-first-vchild window)
378 (window-reduce-to-one (window-first-vchild window))))) 378 (window-reduce-to-one (window-first-vchild window)))))
379 379
380 (defun restore-saved-window (configuration window saved-window direction) 380 (defun restore-saved-window (configuration window saved-window direction)
381 "Within CONFIGURATION, restore WINDOW to the state of SAVED-WINDOW." 381 "Within CONFIGURATION, restore WINDOW to the state of SAVED-WINDOW."
382 (and (saved-window-next-child saved-window) 382 (cond
383 (not (saved-window-minibufferp (saved-window-next-child saved-window))) 383 ((and (saved-window-next-child saved-window)
384 (progn 384 (not (saved-window-minibufferp (saved-window-next-child saved-window))))
385 (cond ((eq direction 'vertical) 385 (cond ((eq direction 'vertical)
386 (split-window window nil nil)) 386 (split-window window nil nil))
387 ((eq direction 'horizontal) 387 ((eq direction 'horizontal)
388 (split-window window nil t))) 388 (split-window window nil t)))
389 (restore-saved-window configuration 389 (if (not (saved-window-minibufferp saved-window))
390 (window-next-child window) 390 (restore-saved-window-parameters configuration window saved-window))
391 (saved-window-next-child saved-window) 391 (restore-saved-window configuration
392 direction))) 392 (window-next-child window)
393 (saved-window-next-child saved-window)
394 direction))
395 ((not (saved-window-minibufferp saved-window))
396 (restore-saved-window-parameters configuration window saved-window)))
393 397
394 (if (saved-window-first-hchild saved-window) 398 (if (saved-window-first-hchild saved-window)
395 (restore-saved-window configuration 399 (restore-saved-window configuration
396 window 400 window
397 (saved-window-first-hchild saved-window) 401 (saved-window-first-hchild saved-window)
398 'horizontal)) 402 'horizontal))
399 (if (saved-window-first-vchild saved-window) 403 (if (saved-window-first-vchild saved-window)
400 (restore-saved-window configuration 404 (restore-saved-window configuration
401 window 405 window
402 (saved-window-first-vchild saved-window) 406 (saved-window-first-vchild saved-window)
403 'vertical)) 407 'vertical)))
404
405 (if (not (saved-window-minibufferp saved-window))
406 (restore-saved-window-parameters configuration window saved-window)))
407 408
408 (defun restore-saved-window-parameters (configuration window saved-window) 409 (defun restore-saved-window-parameters (configuration window saved-window)
409 "Restore the window parameters stored in SAVED-WINDOW on WINDOW." 410 "Restore the window parameters stored in SAVED-WINDOW on WINDOW."
410 (declare (special window-configuration-current-window)) 411 (declare (special window-configuration-current-window))
411 (let ((buffer (saved-window-buffer saved-window))) 412 (let ((buffer (saved-window-buffer saved-window)))