Index: /branches/ide-1.0/ccl/examples/cocoa-editor.lisp
===================================================================
--- /branches/ide-1.0/ccl/examples/cocoa-editor.lisp	(revision 6765)
+++ /branches/ide-1.0/ccl/examples/cocoa-editor.lisp	(revision 6766)
@@ -440,6 +440,6 @@
     (call-next-method)
     (decf edit-count)
-    #+debug
-    (#_NSLog #@"after endEditing on %@, edit-count now = %d" :id self :int edit-count)))
+    (when (< edit-count 0)
+      (#_NSLog #@"after endEditing on %@, edit-count now = %d" :id self :int edit-count))))
 
 ;;; Return true iff we're inside a "beginEditing/endEditing" pair
@@ -640,5 +640,5 @@
   #+debug (#_NSLog #@"Change color to = %@" :id (#/color sender)))
 
-(def-cocoa-default *layout-text-in-background* :int 1 "When non-zero, do text layout when idle.")
+(def-cocoa-default *layout-text-in-background* :bool t "When true, do text layout when idle.")
 
 (objc:defmethod (#/layoutManager:didCompleteLayoutForTextContainer:atEnd: :void)
@@ -646,5 +646,5 @@
   (declare (ignorable cont flag))
   #+debug (#_NSLog #@"layout complete: container = %@, atend = %d" :id cont :int (if flag 1 0))
-  (when (zerop *layout-text-in-background*)
+  (unless *layout-text-in-background*
     (#/setDelegate: layout +null-ptr+)
     (#/setBackgroundLayoutEnabled: layout nil)))
@@ -654,5 +654,5 @@
 (objc:defmethod (#/setBackgroundColor: :void)
     ((self hemlock-textstorage-text-view) color)
-  (#_NSLog #@"Set background color: %@" :id color)
+  #+debug (#_NSLog #@"Set background color: %@" :id color)
   (setf (text-view-blink-color self) color)
   (call-next-method color))
@@ -801,9 +801,9 @@
   (let* ((color (#/color sender)))
     (unless (typep self 'echo-area-view)
-      (let* ((echo-view (slot-value (#/window self) 'echo-area-view)))
-        (#/setBackgroundColor: echo-view color)))
-    (#/setBackgroundColor: self color)
-    (#_NSLog #@"view = %@, color = %@, background = %@" :id self :id color :id (#/backgroundColor self))
-    ))
+      (let* ((window (#/window self))
+             (echo-view (unless (%null-ptr-p window)
+                          (slot-value window 'echo-area-view))))
+        (when echo-view (#/setBackgroundColor: echo-view color))))
+    (#/setBackgroundColor: self color)))
 
 (objc:defmethod (#/changeTextColor: :void)
@@ -1465,5 +1465,5 @@
              #|(*debug-io* *typeout-stream*)|#)
         (stream-clear-output *debug-io*)
-        (print-call-history :detailed-p nil)
+        (print-call-history :detailed-p t)
         (#/performSelectorOnMainThread:withObject:waitUntilDone:
          frame (@selector #/runErrorSheet:) params t)
