(defparameter *handlers* nil) (defun handler (x) (let ((what (cdr (assoc (intern (string-upcase x)) *handlers* )))) (if what (funcall what) (error "no handler for ~a" x)))) (defun register (withThis this) (let ((maker (intern (string-upcase (format nil "make-~a" withThis))))) (push (cons this maker) *handlers*))) (register 'tagwidth 'width) (defmethod linesForAt ((x tagwidth) words this line) (if words (setf (graph-w this) (parse-integer (first words))) (error "~a) expected 1 argument" line)))