[climacs-cvs] CVS climacs

thenriksen thenriksen at common-lisp.net
Sun Jan 6 11:54:45 UTC 2008


Update of /project/climacs/cvsroot/climacs
In directory clnet:/tmp/cvs-serv3361

Modified Files:
	gui.lisp 
Log Message:
Fixed embarassing bug in (setf view) method that caused it to return
T, not the argument to setf. Oops.


--- /project/climacs/cvsroot/climacs/gui.lisp	2008/01/06 10:26:12	1.249
+++ /project/climacs/cvsroot/climacs/gui.lisp	2008/01/06 11:54:45	1.250
@@ -101,32 +101,33 @@
                            (eq (view other-pane) view)))
                   (windows (pane-frame pane))))
         (old-view-active (active (view pane))))
-    (cond ((not (member view (views (pane-frame pane))))
-           (restart-case (error 'unknown-view :view view)
-             (add-to-view-list ()
-              :report "Add the view object to Climacs"
-              (push view (views (pane-frame pane)))
-              (setf (view pane) view))))
-          (window-displaying-view
-           (restart-case
-               (error 'view-already-displayed :view view :window window-displaying-view)
-             (remove-other-use ()
-              :report "Make the other window try to display some other view"
-              (setf (view window-displaying-view) (any-preferably-undisplayed-view))
-              (setf (view pane) view))
-             (remove-other-pane ()
-              :report "Remove the other window displaying the view"
-              (delete-window window-displaying-view)
-              (setf (view pane) view))
-             (clone-view ()
-              :report "Make a clone of the view and use that instead"
-              (setf (view pane) (clone-view-for-climacs
-                                 (pane-frame window-displaying-view) view)))
-             (cancel ()
-              :report "Cancel the setting of the windows view and just return")))
-          (t (call-next-method)))
-    (when old-view-active
-      (ensure-only-view-active (pane-frame pane) view))))
+    (prog1
+        (cond ((not (member view (views (pane-frame pane))))
+               (restart-case (error 'unknown-view :view view)
+                 (add-to-view-list ()
+                  :report "Add the view object to Climacs"
+                  (push view (views (pane-frame pane)))
+                  (setf (view pane) view))))
+              (window-displaying-view
+               (restart-case
+                   (error 'view-already-displayed :view view :window window-displaying-view)
+                 (remove-other-use ()
+                  :report "Make the other window try to display some other view"
+                  (setf (view window-displaying-view) (any-preferably-undisplayed-view))
+                  (setf (view pane) view))
+                 (remove-other-pane ()
+                  :report "Remove the other window displaying the view"
+                  (delete-window window-displaying-view)
+                  (setf (view pane) view))
+                 (clone-view ()
+                  :report "Make a clone of the view and use that instead"
+                  (setf (view pane) (clone-view-for-climacs
+                                     (pane-frame window-displaying-view) view)))
+                 (cancel ()
+                  :report "Cancel the setting of the windows view and just return")))
+              (t (call-next-method)))
+      (when old-view-active
+        (ensure-only-view-active (pane-frame pane) view)))))
 
 (defmethod (setf view) :before ((view drei-view) (pane climacs-pane))
   (with-accessors ((views views)) (pane-frame pane)




More information about the Climacs-cvs mailing list