I've posted the wrong patch in my first message, it was missing a line, here's the correct one:
--- slime.el.orig 2009-03-30 19:01:56.781250000 -0400
+++ slime.el 2009-12-10 00:58:25.843750000 -0500
@@ -1040,6 +1040,9 @@
(set-window-buffer popup-window old-buffer))))
(when (window-live-p selected-window)
(select-window selected-window)))
+ (when sldb-last-window-configuration
+ (set-window-configuration sldb-last-window-configuration)
+ (setq sldb-last-window-configuration nil))
(kill-local-variable 'slime-popup-restore-data)))
(defmacro slime-save-local-variables (vars &rest body)
@@ -4069,6 +4072,8 @@
;;(when msg (slime-insert-transcript-delimiter msg))
;;(setq slime-repl-popup-on-output (not no-popups))
(setq cont (or cont #'slime-display-eval-result))
+ (when (null sldb-last-window-configuration)
+ (setq sldb-last-window-configuration (current-window-configuration)))
(slime-rex (cont (buffer (current-buffer))) (form)
((:ok value) (slime-eval-with-transcript-cont t value cont buffer))
((:abort) (slime-eval-with-transcript-cont nil nil nil buffer))))
@@ -5158,6 +5163,9 @@
:group 'slime-debugger
:type 'integer)
+(defvar sldb-last-window-configuration nil
+ "Last window configuration before creating a new sldb buffer.")
+
;;;;; Local variables in the debugger buffer
Hi, I've been using slime casually for some time now and something always annoyed me, when the debug window pop up, it changes the size of the second window if there's one. I've searched for a ways to fix this behavior many times, but never found any simple solution. So today I've got myself into the code and made some changes. It works but the code is not really correct, one problem is that if you dig farther than the first cause and then use abort, it will hide the remaining debug buffers by restoring windows to their prior state. Can someone help me improve that code or show me a better way to achieve this?
Here's the patch:
--- slime.el.orig 2009-03-30 19:01:56.781250000 -0400
+++ slime.el 2009-12-10 00:28:27.984375000 -0500
@@ -1040,6 +1040,8 @@
(set-window-buffer popup-window old-buffer))))
(when (window-live-p selected-window)
(select-window selected-window)))
+ (when sldb-last-window-configuration
+ (set-window-configuration sldb-last-window-configuration))
(kill-local-variable 'slime-popup-restore-data)))
(defmacro slime-save-local-variables (vars &rest body)
@@ -4069,6 +4071,8 @@
;;(when msg (slime-insert-transcript-delimiter msg))
;;(setq slime-repl-popup-on-output (not no-popups))
(setq cont (or cont #'slime-display-eval-result))
+ (when (null sldb-last-window-configuration)
+ (setq sldb-last-window-configuration (current-window-configuration)))
(slime-rex (cont (buffer (current-buffer))) (form)
((:ok value) (slime-eval-with-transcript-cont t value cont buffer))
((:abort) (slime-eval-with-transcript-cont nil nil nil buffer))))
@@ -5158,6 +5162,9 @@
:group 'slime-debugger
:type 'integer)
+(defvar sldb-last-window-configuration nil
+ "Last window configuration before creating a new sldb buffer.")
+
;;;;; Local variables in the debugger buffer
Thanks