anchor.diff:    (defun remove-events-for-kell (kell)
       (with-lock-held (lock)
         (setf *event-queue* (delete kell *event-queue* :key #'third)))))
  -
  -(defmacro lock-neighboring-kells ((kell) &body body)
  -  "This ensures that we always lock kells from the outermost to the innermost,
  -   preventing deadlocks"
  -  (let ((kellvar (gensym "KELL")))
  -    `(let ((,kellvar ,kell))
  -       (with-lock-held ((lock (parent ,kellvar)))
  -         (with-lock-held ((lock ,kellvar))
  -           ;; FIXME: this should probably use some fancy WITH-LOCK-HELD macroexpansion
  -           ;;        in order to UNWIND-PROTECT all of the lock releases 
  -           (let ((subkells (subkells ,kellvar)))
  -             (mapcar (lambda (subkell)
  -                       (acquire-lock (lock subkell) t))
  -                     subkells)
  -             ,@body
  -             (mapcar (lambda (subkell)
  -                       (release-lock (lock subkell)))
  -                     (reverse subkells))))))))
   
   (defparameter *debugp* nil
     "If T, errors will dump you to the debugger (although you still need to do
  
positive.code:        (remove-duplicates (append (gethash name (local-patterns kell))
                                    (gethash name (down-patterns (parent kell)))
                                    (mappend (lambda (subkell)
                                               (gethash name
                                                        (up-patterns subkell)))
                                             (subkells kell)))))))
    (:method ((process kell) (kell kell))
      "Find all triggers that could match."
      (select-matching-pattern (gethash (name process) (kell-patterns kell))))
    (:method ((process pattern-abstraction) (kell kell))
      "Just match on the new trigger."
      (select-matching-pattern (list process))))
  
  (defun match-on (process kell)
    (when (not (deadp process))
      (handler-case
          (lock-neighboring-kells (kell)
            (destructuring-bind (&optional trigger matched-processes substitutions)
                (really-match-on process kell)
              (when (and trigger matched-processes)
                (trigger-process trigger substitutions)
                (mapc #'activate-continuation matched-processes))))
        (kiln-error (c) (handle-error c)))))
  
  (defun find-triggers-matching-message (name kell)
    "Collect down-patterns from parent kell, up-patterns from subkells, and local-
  
negative.code:     (setf (process kell) (compose-processes process (process kell)))
      (activate-process process kell))
    (:method ((process parallel-composition) (kell kell))
      (map-process (lambda (sub-process) (add-process sub-process kell)) process))
    (:method ((process kell) (kell kell))
      (if (gethash (name process) (kells kell))
          (error 'duplicate-kell-name-error :name (name process))
  