   (let ((size-list
 	 (loop
 	  for f = face then (face-attribute f :inherit)
-	  until (eq f 'unspecified)
+	  until (or (not f) (eq f 'unspecified))
 	  for h = (face-attribute f :height)
 	  collect (if (eq h 'unspecified) nil h))))
     (reduce 'htmlize-merge-size (cons nil size-list))))

	      (> res limit))
	  limit
	res)))))

;;; Transformation of buffer text: HTML escapes, untabification, etc.

(defvar htmlize-basic-character-table

(defun htmlize-default-body-tag (face-map)
  nil					; no doc-string
  "<body>")
 
;;; CSS based output support.

;; Internal function; not a method.
