anchor.diff:  
   (defun handle-message (id message &rest args)
     (declare (dynamic-extent args))
  -  (dolist (sender (log5-senders (log-manager)))
  -    ;; check for new category and fix things up
  -    (when (>= id (length (active-categories sender)))
  -      ;;?? how pricy is this?
  -      (update-active-categories sender id))
  -    (when (= (aref (active-categories sender) id) 1)
  -      (funcall (handle-message-fn sender) id sender
  -	       (if args (apply #'format nil message args) message)))))
  -
  -(defun update-active-categories (sender max-id)
  -  (let ((current-max-id (length (active-categories sender)))
  -	(new-array (adjust-array (active-categories sender) (1+ max-id))))
  -    (loop for index from current-max-id to max-id do
  -	 (setf (aref new-array index)
  -	       (if (sender-responds-to-category-p
  -		    (category-spec sender) 
  -		    (id->category index)) 1 0)))
  -    (setf (slot-value (first (log5:senders)) 'active-categories)
  -	  new-array)
  -    sender))
  +  (let ((output nil))
  +    (dolist (sender (log5-senders (log-manager)))
  +      ;; check for new category and fix things up
  +      (when (>= id (length (active-categories sender)))
  +	;;?? how pricy is this?
  +	(update-active-categories sender id))
  +      #+(or)
  +      (format t "~&~a ~d ~a" 
  +	      sender id (aref (active-categories sender) id))
  +      (when (= (aref (active-categories sender) id) 1)
  +	(funcall (handle-message-fn sender) id sender
  +		 (or output
  +		     (setf output
  +			   (if args 
  +			       (apply #'format nil message args) message))))
  +	(values t)))))
   
   
   #|
  
positive.code: (defun log-manager ()
    "Returns the component that handles all of log5's bookkeeping."
    (or *log-manager* (setf *log-manager* (make-log-manager))))
  
  (defstruct (log-manager (:conc-name log5-))
    senders
  
negative.code: (defmethod close-sender (sender)
    (declare (ignore sender)))
  
  (defclass stream-sender-mixin (basic-sender)
    ((output-stream :reader output-stream)
     (close-stream? :reader close-stream?)
     (location :initarg :location :reader location)))
  
  (defmethod create-handle-message-context ((sender stream-sender-mixin))
    `((stream (output-stream sender))))
  
  (defmethod start-handling ((sender stream-sender-mixin)) 
    `((file-position stream (file-length stream))
      (fresh-line stream)))
  
  (defmethod finish-handling ((sender stream-sender-mixin))
    `((force-output stream)))
  
  (defmethod separate-properties ((sender stream-sender-mixin))
    `(princ #\Space stream))
  
  (defmethod handle-output ((sender stream-sender-mixin) output)
    (cond ((eq output 'message)
  	 `(progn (princ #\" stream) (princ message stream) (princ #\" stream)))
  	((eq output 'category)
  	 `(progn 
  	    (princ #\" stream) 
  	    (let ((category (id->category category-id)))
  	      (if category
  		  (princ (category-specification category) stream)
  		  (format stream "\"category ~d not found\"" category-id)))
  	    (princ #\" stream)))
  	((eq output 'context)
  	 `(princ (log5-context (log-manager)) stream))
  	((eq output 'first-context)
  	 `(princ (first (log5-context (log-manager))) stream))
  	((stringp output)
  	 `(progn (princ #\" stream) (princ ,output stream) (princ #\" stream)))
  	((typep output 'log-output)
  	 (if (output-format output)
  	     `(format stream ,(output-format output) ,(output-form output))
  	     `(princ ,(output-form output) stream)))
  	(t
  	 (error "don't know how to handle ~a" output))))
  
  #+(or)
  ;; trying to refactor
  (defun output->value-code (output)
    (cond ((eq output 'message)
  	 `message)
  	((eq output 'category)
  	 `(category-specification (id->category category-id)))
  	((eq output 'context)
  	 `(log5-context (log-manager)))
  	((eq output 'first-context)
  	 `(first (log5-context (log-manager))))
  	((stringp output)
  	 output)
  	((typep output 'log-output)
  	 (if (output-format output)
  	     `(format stream ,(output-format output) ,(output-form output))
  	     `(princ ,(output-form output) stream)))
  	(t
  	 (error "don't know how to handle ~a" output))))
  
  (defmethod initialize-instance :after ((object stream-sender-mixin) 
  				       &key location)
    (setf (slot-value object 'close-stream?) (not (streamp location))
  	(slot-value object 'output-stream)
  	(cond ((streamp location) location)
  	      ((or (pathnamep location) (stringp location))
  	       (ensure-directories-exist location)
  	       (open location :direction :output
  		     :if-does-not-exist :create
  		     :if-exists :append 
  		     #+(or) (if reset-log? :supersede :append)))
  	      (t (error "don't know how to log to ~a" location)))))
  
  (defmethod close-sender ((sender stream-sender-mixin))
    (when (close-stream? sender)
      (close (output-stream sender))))
  
  (defclass stream-sender (stream-sender-mixin sender-with-categories)
    ())
  
  ;;;;; messages 
  
  (defmacro log-for (category-spec message &rest args)
    (if (member :no-logging *features*)
        `(values)
        `(let ((category (load-time-value 
  			(update-category-spec nil ',category-spec)
  			:read-only-p t)))
  	 (handle-message
  	  (category-id category)
  	  ,message
  	  ,@args))))
  
  
  ;;;;; context
  
  