Index: esa.lisp
===================================================================
RCS file: /project/climacs/cvsroot/climacs/esa.lisp,v
retrieving revision 1.27
diff -u -r1.27 esa.lisp
--- esa.lisp	3 Mar 2006 19:38:57 -0000	1.27
+++ esa.lisp	24 Mar 2006 14:03:42 -0000
@@ -271,7 +271,7 @@
     (call-next-method)))
 
 (defmethod execute-frame-command :after ((frame esa-frame-mixin) command)
-  (setf (previous-command *standard-output*)
+  (setf (previous-command (car (slot-value frame 'windows)))
 	(if (consp command)
 	    (car command)
 	    command)))
Index: gui.lisp
===================================================================
RCS file: /project/climacs/cvsroot/climacs/gui.lisp,v
retrieving revision 1.204
diff -u -r1.204 gui.lisp
--- gui.lisp	3 Mar 2006 19:38:57 -0000	1.204
+++ gui.lisp	24 Mar 2006 14:03:42 -0000
@@ -282,25 +282,26 @@
 (defvar *kill-ring* (make-instance 'kill-ring :max-size 7))
 
 (defmethod execute-frame-command :around ((frame climacs) command)
-  (handler-case
-      (if (buffer-pane-p (current-window))
-	  (with-undo ((buffer (current-window)))
-	    (call-next-method))
-	  (call-next-method))
-    (offset-before-beginning ()
-      (beep) (display-message "Beginning of buffer"))
-    (offset-after-end ()
-      (beep) (display-message "End of buffer"))
-    (motion-before-beginning ()
-      (beep) (display-message "Beginning of buffer"))
-    (motion-after-end ()
-      (beep) (display-message "End of buffer"))
-    (no-expression ()
-      (beep) (display-message "No expression around point"))
-    (no-such-operation ()
-      (beep) (display-message "Operation unavailable for syntax"))
-    (buffer-read-only ()
-      (beep) (display-message "Buffer is read only"))))  
+  (let ((current-window (car (windows frame))))
+    (handler-case
+        (if (buffer-pane-p current-window)
+            (with-undo ((buffer current-window))
+              (call-next-method))
+            (call-next-method))
+      (offset-before-beginning ()
+        (beep) (display-message "Beginning of buffer"))
+      (offset-after-end ()
+        (beep) (display-message "End of buffer"))
+      (motion-before-beginning ()
+        (beep) (display-message "Beginning of buffer"))
+      (motion-after-end ()
+        (beep) (display-message "End of buffer"))
+      (no-expression ()
+        (beep) (display-message "No expression around point"))
+      (no-such-operation ()
+        (beep) (display-message "Operation unavailable for syntax"))
+      (buffer-read-only ()
+        (beep) (display-message "Buffer is read only")))))
 
 (defmethod execute-frame-command :after ((frame climacs) command)
   (loop for buffer in (buffers frame)
