anchor.diff:        s1))
   
   (defun parse-text-style (style)
  -  (if (text-style-p style)
  -      style
  -    (let ((family nil)
  -	  (face nil)
  -	  (size nil))
  -      (loop for item in style
  -	    do (cond
  -		((member item '(:fix :serif :sans-serif))
  -		 (setq family item))
  -		((or (member item '(:roman :bold :italic))
  -		     (consp item))
  -		 (setq face item))
  -		((or (member item '(:tiny :very-small :small :normal
  -				    :large :very-large :huge))
  -		     (numberp item))
  -		 (setq size item))))
  -      (make-text-style family face size))))
  +  (cond ((text-style-p style) style)
  +        ((null style) (make-text-style nil nil nil)) ; ?
  +        ((and (listp style) (= 3 (length style)))
  +         (apply #'make-text-style style))
  +        (t (error "Invalid text style specification ~S." style))))
   
   (defmacro with-text-style ((medium text-style) &body body)
     (when (eq medium t)
       (setq medium '*standard-output*))
     (check-type medium symbol)
  -  `(flet ((continuation (,medium)
  -            (declare (ignorable ,medium))
  -	    ,@body))
  -     (declare (dynamic-extent #'continuation))
  -     (invoke-with-text-style ,medium #'continuation
  -                             (parse-text-style ,text-style))))
  +  (with-gensyms (cont)
  +    `(flet ((,cont (,medium)
  +              (declare (ignorable ,medium))
  +              ,@body))
  +       (declare (dynamic-extent #',cont))
  +       (invoke-with-text-style ,medium #',cont
  +                               (parse-text-style ,text-style)))))
   
   (defmethod invoke-with-text-style ((sheet sheet) continuation text-style)
     (let ((medium (sheet-medium sheet))) ; FIXME: WITH-SHEET-MEDIUM
  
positive.code:   (if (and (not (device-font-text-style-p s1))
  	   (not (device-font-text-style-p s2)))
        (let* ((family (or (text-style-family s1) (text-style-family s2)))
               (face (or (text-style-face s1) (text-style-face s2)))
               (size1 (text-style-size s1))
               (size2 (text-style-size s2))
               (size (case size1
  
negative.code:   (declare (type symbol medium))
    (when (eq medium t)
      (setq medium '*standard-output*))
    (with-gensyms (cont)
      `(flet ((,cont (,medium)
                (declare (ignorable ,medium))
                ,@body))
         (declare (dynamic-extent #',cont))
         (invoke-with-text-style ,medium #',cont
                                 (make-text-style ,family nil nil)))))
  
  (defmacro with-text-face ((medium face) &body body)
    (declare (type symbol medium))
    (when (eq medium t)
      (setq medium '*standard-output*))
    (with-gensyms (cont)
      `(flet ((,cont (,medium)
                (declare (ignorable ,medium))
                ,@body))
         (declare (dynamic-extent #',cont))
         (invoke-with-text-style ,medium #',cont
                                 (make-text-style nil ,face nil)))))
  
  (defmacro with-text-size ((medium size) &body body)
    (declare (type symbol medium))
    (when (eq medium t) (setq medium '*standard-output*))
    (with-gensyms (cont)
      `(flet ((,cont (,medium)
                (declare (ignorable ,medium))
                ,@body))
         (declare (dynamic-extent #',cont))
         (invoke-with-text-style ,medium #',cont
                                 (make-text-style nil nil ,size)))))
  
  
  