# HG changeset patch # User Mike Sperber # Date 1208011298 -7200 # Node ID 715c3ced8fa8333d59834087c41ddc5ca28edf7f # Parent e7b3a3266356537ddd9926ac0aadf7cb43a49ed6 Use `real-split-window', `real-delete-window' in window-config code. 2008-04-12 Henry S. Thompson * window-xemacs.el (real-split-window, real-delete-window): Define these to the original definitions of `split-window' and `delete-window', and use them in the window-configuration code to make sure it doesn't get affected by advice to these functions. diff -r e7b3a3266356 -r 715c3ced8fa8 lisp/ChangeLog --- a/lisp/ChangeLog Thu Apr 10 00:31:27 2008 +0200 +++ b/lisp/ChangeLog Sat Apr 12 16:41:38 2008 +0200 @@ -1,3 +1,10 @@ +2008-04-12 Henry S. Thompson + + * window-xemacs.el (real-split-window, real-delete-window): Define + these to the original definitions of `split-window' and + `delete-window', and use them in the window-configuration code to + make sure it doesn't get affected by advice to these functions. + 2008-04-10 Aidan Kehoe * help.el (describe-function-1): diff -r e7b3a3266356 -r 715c3ced8fa8 lisp/window-xemacs.el --- a/lisp/window-xemacs.el Thu Apr 10 00:31:27 2008 +0200 +++ b/lisp/window-xemacs.el Sat Apr 12 16:41:38 2008 +0200 @@ -135,6 +135,10 @@ min-width min-height saved-root-window) +; make sure we don't get affected by harmful advice +(fset 'real-split-window (symbol-function 'split-window)) +(fset 'real-delete-window (symbol-function 'delete-window)) + (defun window-configuration-equal (conf-1 conf-2) "Returns a boolean indicating whether the two given configurations are identical. @@ -369,7 +373,7 @@ (while window (if (window-live-p window) (let ((next (window-next-child window))) - (delete-window window) + (real-delete-window window) (setq window next))))) (cond ((window-first-hchild window) @@ -383,9 +387,9 @@ ((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)) + (real-split-window window nil nil)) ((eq direction 'horizontal) - (split-window window nil t))) + (real-split-window window nil t))) (if (not (saved-window-minibufferp saved-window)) (restore-saved-window-parameters configuration window saved-window)) (restore-saved-window configuration