anchor.diff:  	    (:constructor %make-format-table)
   	    (:conc-name table-))
     "Structure for format tables.
  -This structure holds its name and mappings from characters to directives."
  -  (name nil)
  +This structure holds the MAPPINGS from characters to directives."
     (mappings (make-hash-table) :type hash-table))
  -
  -(defun table-id (table)
  -  "Return TABLE's name or an identification string if anonymous."
  -  (or (table-name table)
  -      (with-output-to-string (str)
  -	(print-unreadable-object (table str :type t :identity t)
  -	  (princ "(ANONYMOUS)" str)))))
   
   (define-condition format-table-error (focus-error)
     ((table :documentation "The format table."
   	  :initarg :table
   	  :reader table))
  -  (:documentation "An format table error."))
  +  (:documentation "A format table error."))
   
   
   
  
positive.code: ;; Table Creation
  ;; ==========================================================================
  
  (defun make-format-table (&key name (initially :standard) (make-current t))
    "Create and return a new format table.
  - NAME must be a symbol. If non-nil, the table is automatically registered.
    Otherwise, the table is considered to be anonymous and you must retain a
    reference to it yourself.
  - The table may be INITIALLY :standard (default) or :blank.
  - If MAKE-CURRENT, make the new table current."
    (when (and name (find-format-table name nil))
      (error 'existing-table :name name))
    (let* ((table (%make-format-table :name name))
  	 (mappings (table-mappings table)))
      (when (eq initially :standard)
        (dolist (directive +standard-directives+)
  	(let ((char (directive-character directive)))
  	  (setf (gethash char mappings) directive)
  	  (when (both-case-p char)
  	    (setf (gethash (char-downcase char) mappings) directive)))))
      (when name
        (do-register-format-table table))
      (when make-current
        ;; forward-use of *FORMAT-TABLE*
        (setq *format-table* table))
      table))
  
  
  
  
negative.code: ;; Table Lookup and (un)Registration
  ;; ==========================================================================
  
  (define-condition table-lookup-error (focus-error)
    ((name :documentation "The looked up name."
  	 :initarg :name
  	 :reader name))
    (:documentation "A format table lookup error."))
  
  (define-condition missing-table (table-lookup-error)
    ()
    (:report (lambda (error stream)
  	     (cl:format stream "\
  There is no format table registered under the name `~A'." (name error))))
    (:documentation "A missing format table error."))
  
  (define-condition table-collision (table-lookup-error)
    ()
    (:report (lambda (error stream)
  	     (cl:format stream "\
  A format table is already registered under the name `~A'." (name error))))
    (:documentation "A table collision error."))
  
  
  (let ((format-tables (make-hash-table)))
    (defun lookup-table
        (name &optional (errorp t) &aux (table (gethash name format-tables)))
      "Look for a format table registered under NAME.
  ERRORP (the default) means to throw a TABLE-NOT-REGISTERED error if no such
  table is found. Otherwise, just return nil."
      (or table (when errorp (error 'missing-table :name name))))
  
    (defun table-name (table)
      "Find TABLE's name if registered, return nil otherwise."
      (loop :for key :being :the :hash-keys :in format-tables
  	    :using (:hash-value value)
  	  :when (eq table value)
  	    :do (return key)))
  
    (defun register-format-table (table name &optional force)
      "Register TABLE under NAME and return it.
  FORCE means overwrite an already existing registration under that
  name. Otherwise (the default), throw a TABLE-ALREADY-REGISTERED error."
      (when (and (lookup-table name nil) (not force))
        (error 'table-collision :name name))
      (setf (gethash name format-tables) table))
  
    (defun unregister-format-table (name)
      "Unregister NAMEd table."
      (remhash name format-tables)))
  
  
  (defun find-table (table-or-name)
    "Return its table argument directly, or look it up by name."
    (if (format-table-p table-or-name)
        table-or-name
        (lookup-table table-or-name)))
  
  (defmethod print-object ((table format-table) stream
  			 &aux (name (or (table-name table) "(UNREGISTERED)")))
    "Add format TABLE's name, if registered, to its printed representation."
    (print-unreadable-object (table stream :type t :identity t)
      (princ name stream)))
  
  
  
  