1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(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.
This commit is contained in:
Eli Zaretskii 2002-03-24 19:16:22 +00:00
parent 9e5aa8de39
commit 1896206dc4
2 changed files with 19 additions and 2 deletions

View 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,Bm(Bk <Pavel@Janik.cz>
* mwheel.el (mouse-wheel-mode): Use the result of

View 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)))