anchor.diff:                (values x1 y1)
                 (tracking-pointer (pane)
                   (:pointer-motion (&key window x y)
  -                                 (declare (ignore window))
  -                                 (set-status-line (format nil "~:(~A~) from (~D,~D) to (~D,~D)"
  -                                                          (slot-value *application-frame*
  -                                                                      'drawing-mode)
  -                                                          (round x1) (round y1)
  -                                                          (round x) (round y)))
  -                                 (with-output-recording-options (pane :record nil)
  -                                   (copy-from-pixmap canvas-pixmap 0 0 pixmap-width pixmap-height pane 0 0)
  -                                   (draw-figure pane
  -                                                x1 y1 x y
  -                                                :fastp t
  -						:cp-x1 cp-x1 :cp-y1 cp-y1
  -						:cp-x2 cp-x2 :cp-y2 cp-y2)))
  +                   (declare (ignore window))
  +                   (set-status-line (format nil "~:(~A~) from (~D,~D) to (~D,~D)"
  +                                            (slot-value *application-frame*
  +                                                        'drawing-mode)
  +                                            (round x1) (round y1)
  +                                            (round x) (round y)))
  +                   (with-output-recording-options (pane :record nil)
  +                     (copy-from-pixmap canvas-pixmap 0 0
  +                                       pixmap-width pixmap-height pane 0 0)
  +                     (draw-figure pane
  +                                  x1 y1 x y
  +                                  :fastp t
  +				  :cp-x1 cp-x1 :cp-y1 cp-y1
  +				  :cp-x2 cp-x2 :cp-y2 cp-y2)))
   		(:pointer-button-release (&key event x y)
  -                                         (when (= (pointer-event-button event)
  -                                                  +pointer-left-button+)
  -                                           (return-from processor (values x y))))
  +                  (when (= (pointer-event-button event)
  +                           +pointer-left-button+)
  +                    (return-from processor (values x y))))
                   (:pointer-button-press (&key event x y)
  -				       (cond
  -					 ((= (pointer-event-button event)
  -					     +pointer-right-button+)
  -					   (setf cp-x1 x cp-y1 y))
  -					 ((= (pointer-event-button event)
  -					     +pointer-middle-button+)
  -					   (setf cp-x2 x cp-y2 y)))))))
  +		  (cond
  +		    ((= (pointer-event-button event)
  +			+pointer-right-button+)
  +		     (setf cp-x1 x cp-y1 y))
  +		    ((= (pointer-event-button event)
  +			+pointer-middle-button+)
  +		     (setf cp-x2 x cp-y2 y)))))))
         (set-status-line " ")
         (copy-from-pixmap canvas-pixmap 0 0 pixmap-width pixmap-height pane 0 0)
         (deallocate-pixmap canvas-pixmap)
  -      (let ((new-record (with-output-to-output-record (*standard-output*)
  -                          (draw-figure pane x1 y1 x y
  -		                       :cp-x1 cp-x1 :cp-y1 cp-y1
  -		                       :cp-x2 cp-x2 :cp-y2 cp-y2))))
  -        (push new-record (clim-fig-undo-list *application-frame*))
  -        (with-output-as-presentation (pane nil 'figure)
  -            (stream-add-output-record *standard-output* new-record))
  -        (replay new-record *standard-output* (bounding-rectangle new-record)))
  -      (setf (clim-fig-redo-list *application-frame*) nil))))
  +      (let ((new-presentation (with-output-as-presentation (pane nil 'figure)
  +                                (draw-figure pane x1 y1 x y
  +		                             :cp-x1 cp-x1 :cp-y1 cp-y1
  +		                             :cp-x2 cp-x2 :cp-y2 cp-y2))))
  +        (push new-presentation (clim-fig-undo-list *application-frame*))
  +        (replay new-presentation *standard-output* (bounding-rectangle new-presentation)))
  +      (setf (clim-fig-redo-list *application-frame*) nil)
  +      (deactivate-gadget (find-pane-named *application-frame* 'redo))
  +      (activate-gadget (find-pane-named *application-frame* 'undo))
  +      (activate-gadget (find-pane-named *application-frame* 'clear)))))
   
   (defun handle-move-object (pane figure first-point-x first-point-y)
  -  (tracking-pointer (pane)
  -    (:pointer-button-release (&key event x y)
  -      (when (= (pointer-event-button event) +pointer-right-button+)
  -        (multiple-value-bind (old-x old-y)
  -            (output-record-position figure)
  -          (setf (output-record-position figure)
  -                (values (+ old-x (- x first-point-x))
  -                        (+ old-y (- y first-point-y)))))
  -        (window-refresh pane)
  -        (return-from handle-move-object)))))
  +  (multiple-value-bind (figure-x figure-y)
  +      (output-record-position figure)
  +    (let ((offset-x (- figure-x first-point-x))
  +          (offset-y (- figure-y first-point-y)))
  +     (tracking-pointer (pane)
  +       (:pointer-motion (&key window x y)
  +         (declare (ignore window))
  +         (setf (output-record-position figure)
  +               (values (+ x offset-x)
  +                       (+ y offset-y)))
  +         (window-refresh pane))
  +       (:pointer-button-release (&key event x y)
  +         (when (= (pointer-event-button event) +pointer-right-button+)
  +           (push (make-instance 'clim-fig-move-event
  +                                :record figure
  +                                :delta-x (- x first-point-x)
  +                                :delta-y (- y first-point-y))
  +                 (clim-fig-undo-list *application-frame*))
  +           (setf (clim-fig-redo-list *application-frame*) (list))
  +           (deactivate-gadget (find-pane-named *application-frame* 'redo))
  +           (window-refresh pane)
  +           (return-from handle-move-object)))))))
   
   (defun clim-fig ()
     (run-frame-top-level (make-application-frame 'clim-fig)))
  
positive.code:   (:layouts
     (default
       (vertically ()
         (horizontally ()
           (vertically (:width 150)
             (tabling (:height 60)
               (list black-button blue-button green-button cyan-button)
               (list red-button magenta-button yellow-button white-button)
               (list turquoise-button grey-button brown-button orange-button))
             line-width-slider
             round-shape-toggle
             (horizontally () fill-mode-toggle constrict-toggle)
             point-button line-button arrow-button
             ellipse-button rectangle-button
  	   bezier-button)
           (scrolling (:width 600 :height 400) canvas))
         (horizontally (:height 30) clear undo redo)
         status)))
    (:top-level (default-frame-top-level :prompt 'clim-fig-prompt)))
  
negative.code: 		'list)
          (clim-fig-undo-list *application-frame*))
    (setf (clim-fig-redo-list *application-frame*) (list))
    (deactivate-gadget (find-pane-named *application-frame* 'redo))
    (deactivate-gadget (find-pane-named *application-frame* 'clear))
    (window-clear *standard-output*))
  
  (define-clim-fig-command (com-add-figure :name nil) ((x real) (y real))
  