Mercurial > emacs
diff lisp/enriched.el @ 44126:00aef3a1182b
(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.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sun, 24 Mar 2002 19:14:32 +0000 |
parents | b1eda5349a48 |
children | aff7bdba6572 |
line wrap: on
line diff
--- 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 <x-color>")) ((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 <x-bg-color>")) ((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)))