+Third argument DOC is the face documentation, it is ignored.
+
+It does nothing if FACE has been bound, otherwise set the face
+attributes according to SPEC.
+
+The remaining arguments should have the form
+
+ [KEYWORD VALUE]...
+
+The following KEYWORDs are defined:
+
+:group VALUE should be a customization group, but it is ignored.
+
+SPEC should be an alist of the form ((DISPLAY ATTS)...).
+
+ATTS is of the form (KEY VALUE) where KEY is a symbol of `:foreground',
+`:background', `:bold', `:italic' or `:underline'. The other KEYs are
+ignored.
+
+The ATTS of the first entry in SPEC where the DISPLAY matches the
+frame should take effect in that frame. DISPLAY can either be the
+symbol t, which will match all frames, or an alist of the form
+\((REQ ITEM...)...)
+
+For the DISPLAY to match a FRAME, the REQ property of the frame must
+match one of the ITEM. The following REQ are defined:
+
+`type' (the value of `window-system')
+ Should be one of `x' or `tty'.
+
+`class' (the frame's color support)
+ Should be one of `color', `grayscale', or `mono'.
+
+`background' (the value of `frame-background-mode', what color is used
+for the background text)
+ Should be one of `light' or `dark'."
+ ((fboundp 'make-face)
+ (` (let ((name (quote (, face))))
+ (or
+ (find-face name)
+ (let ((face (make-face name))
+ (spec (, spec))
+ (colorp (and window-system (x-display-color-p)))
+ display atts req item match done)
+ (while (and spec (not done))
+ (setq display (car (car spec))
+ atts (car (cdr (car spec)))
+ spec (cdr spec))
+ (cond
+ ((consp display)
+ (setq match t)
+ (while (and display match)
+ (setq req (car (car display))
+ item (car (cdr (car display)))
+ display (cdr display))
+ (cond
+ ((eq 'type req)
+ (setq match (or (eq window-system item)
+ (and (not window-system)
+ (eq 'tty item)))))
+ ((eq 'class req)
+ (setq match (or (and colorp (eq 'color item))
+ (and (not colorp)
+ (memq item '(grayscale mono))))))
+ ((eq 'background req)
+ (setq match (eq frame-background-mode item)))))
+ (setq done match))
+ ((eq t display)
+ (setq done t))))
+ (if done
+ (let ((alist '((:foreground . set-face-foreground)
+ (:background . set-face-background)
+ (:bold . set-face-bold-p)
+ (:italic . set-face-italic-p)
+ (:underline . set-face-underline-p)))
+ function)
+ (while atts
+ (if (setq function (cdr (assq (car atts) alist)))
+ (funcall function face (car (cdr atts))))
+ (setq atts (cdr (cdr atts))))))
+ face)))))
+ (t
+ nil ;; do nothing.
+ ))
+
+(defmacro-maybe define-widget (name class doc &rest args)