changeset 4444:715c3ced8fa8

Use `real-split-window', `real-delete-window' in window-config code. 2008-04-12 Henry S. Thompson <ht@inf.ed.ac.uk> * 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.
author Mike Sperber <sperber@deinprogramm.de>
date Sat, 12 Apr 2008 16:41:38 +0200
parents e7b3a3266356
children 1d41b9bcf74f
files lisp/ChangeLog lisp/window-xemacs.el
diffstat 2 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 <ht@inf.ed.ac.uk>
+
+	* 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  <kehoea@parhasard.net>
 
 	* help.el (describe-function-1): 
--- 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