From: Eli Zaretskii Date: Sun, 24 Mar 2002 19:16:22 +0000 (+0000) Subject: (enriched-face-ans): Support FACE of the form X-Git-Tag: ttn-vms-21-2-B4~15996 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1896206dc4bbe359fbb60cae18ef2122658a3692;p=emacs.git (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 --git a/lisp/ChangeLog b/lisp/ChangeLog index e6a762003a1..252445a2bd2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2002-03-24 Eli Zaretskii + + * facemenu.el (facemenu-get-face): Remove unised variable + `foreground'. + + * enriched.el (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. + 2002-03-24 Pavel Jan,Bm(Bk * mwheel.el (mouse-wheel-mode): Use the result of diff --git a/lisp/enriched.el b/lisp/enriched.el index 74258e60941..7d0c9fa70b8 100644 --- a/lisp/enriched.el +++ b/lisp/enriched.el @@ -341,6 +341,10 @@ which can be the value of the `face' text property." (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 @@ Return value is \(begin end name positive-p), or nil if none was found." (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 @@ Return value is \(begin end name positive-p), or nil if none was found." (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)))