anchor.diff:    "Returns the category whose id is id (a number)."
     (gethash id *id->category*))
   
  +(defun name->category (name)
  +  "Returns the category whose name (assumed to be properly **canonized**) is name."
  +  (gethash name *name->category*))
  +
   (defun canonize-category-name (name)
  -  (typecase name
  -    (string (intern name *package*))
  -    (symbol (if (eq (symbol-package name) (find-package :keyword))
  -		(intern (symbol-name name) *package*)
  -		name))
  -    (t (error 'bad-category-type-error :name name))))
  +  (let ((use-name 
  +	 (typecase name
  +	   (string (intern name *package*))
  +	   (symbol (if (eq (symbol-package name) (find-package :keyword))
  +		       (intern (symbol-name name) *package*)
  +		       name))
  +	   (t (error 'bad-category-type-error :name name)))))
  +    (when (not (or (name->category use-name)
  +		   (logical-connective-p use-name)))
  +      (error 'simple-category-not-found-error :name name))
  +    use-name))
   
   (defun canonize-category-specification (specification)
     (labels ((doit (x)
  
positive.code: 		    (category-negated-variables value))
  	    (determine-category-variables (or use-spec (list use-name))))
        (when name
  	(setf (gethash name *name->category*) value))
        (setf (gethash (category-id value) *id->category*) value)
        value)))
  
  
negative.code: (defclass basic-sender ()
    ((lock :reader lock)
     (name :reader name :initarg :name)
     (output-spec :initarg :output-spec :reader output-spec)
     (handle-message-fn :reader handle-message-fn)
     (active-categories :reader active-categories
  		      :initform (make-array 0 :element-type 'bit)))
    (:documentation "The root sender class from which all senders should descend."))
  
  (defmethod print-object ((sender basic-sender) stream)
    (print-unreadable-object (sender stream :type t :identity t)
      (print-sender sender stream)))
  
  (defgeneric print-sender (sender stream)
    (:documentation "Print information about sender to stream"))
  
  (defmethod print-sender ((sender basic-sender) stream)
    (format stream "~a" (name sender)))
  
  (defmethod initialize-instance :after ((object basic-sender) &key 
  				       )
    (setf (slot-value object 'handle-message-fn)
  	(build-handle-message-fn object)))
  
  (defmethod update-active-categories ((sender basic-sender) max-id)
    (setf (slot-value sender 'active-categories)
  	(adjust-array (active-categories sender) (1+ max-id)
  		      :initial-element 0))
    sender)
  
  (defclass sender-with-categories (basic-sender)
    ((category-spec :initarg :category-spec :reader category-spec)
     (expanded-specification :initform nil :reader expanded-specification))
    (:documentation "A sender that responds only to certain log categories."))
  
  (defmethod initialize-instance :after ((object sender-with-categories) &key 
  				       )
    (setf (slot-value object 'expanded-specification)
  	(canonize-category-specification (slot-value object 'category-spec))
  	(slot-value object 'active-categories)
  	(make-active-category-array object)))
  
  