# HG changeset patch # User Eli Zaretskii # Date 1016997272 0 # Node ID 00aef3a1182bbead2094196ccfb2602f8240959b # Parent cf467d8b13097b0d4a258cdab7ab713b3376e528 (enriched-face-ans): Support FACE of the form (:foreground COLOR) and (:background COLOR). (enriched-decode-foreground, enriched-decode-background): Set the fore- and background colors of the faces we create, since facemenu doesn't. diff -r cf467d8b1309 -r 00aef3a1182b lisp/enriched.el --- a/lisp/enriched.el Sun Mar 24 16:30:54 2002 +0000 +++ b/lisp/enriched.el Sun Mar 24 19:14:32 2002 +0000 @@ -341,6 +341,10 @@ (list (list "x-color" (cdr face)))) ((and (consp face) (eq (car face) 'background-color)) (list (list "x-bg-color" (cdr face)))) + ((and (listp face) (eq (car face) :foreground)) + (list (list "x-color" (cadr face)))) + ((and (listp face) (eq (car face) :background)) + (list (list "x-bg-color" (cadr face)))) ((listp face) (apply 'append (mapcar 'enriched-face-ans face))) ((string-match "^fg:" (symbol-name face)) @@ -436,7 +440,8 @@ (cond ((null color) (message "Warning: no color specified for ")) ((facep face)) - ((and (display-color-p) (facemenu-get-face face))) + ((and (display-color-p) (facemenu-get-face face)) + (set-face-foreground face color)) ((make-face face) (message "Warning: color `%s' can't be displayed" color))) (list from to 'face face))) @@ -446,7 +451,8 @@ (cond ((null color) (message "Warning: no color specified for ")) ((facep face)) - ((and (display-color-p) (facemenu-get-face face))) + ((and (display-color-p) (facemenu-get-face face)) + (set-face-background face color)) ((make-face face) (message "Warning: color `%s' can't be displayed" color))) (list from to 'face face)))