]> git.eshelyaron.com Git - emacs.git/commitdiff
(enriched-face-ans): Support FACE of the form
authorEli Zaretskii <eliz@gnu.org>
Sun, 24 Mar 2002 19:16:22 +0000 (19:16 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sun, 24 Mar 2002 19:16:22 +0000 (19:16 +0000)
(: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.

lisp/ChangeLog
lisp/enriched.el

index e6a762003a16a74b2fd43c3cf740dbc99c2366c4..252445a2bd2787fc363e2ba0325205e57e16bef0 100644 (file)
@@ -1,3 +1,14 @@
+2002-03-24  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * 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\e,Bm\e(Bk  <Pavel@Janik.cz>
 
        * mwheel.el (mouse-wheel-mode): Use the result of
index 74258e60941bd1662b883bf0697cd8e4c7c5de74..7d0c9fa70b866d8ced5aadbe455a48463d3d3571 100644 (file)
@@ -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 <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 @@ Return value is \(begin end name positive-p), or nil if none was found."
     (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)))