diff options
| author | Eli Zaretskii | 2002-03-24 19:16:22 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2002-03-24 19:16:22 +0000 |
| commit | 1896206dc4bbe359fbb60cae18ef2122658a3692 (patch) | |
| tree | 6f6b870f5bbd6c38be35075a9560f2be083d4ec9 | |
| parent | 9e5aa8de39a5ea24d7264818222ab61e452a46e9 (diff) | |
| download | emacs-1896206dc4bbe359fbb60cae18ef2122658a3692.tar.gz emacs-1896206dc4bbe359fbb60cae18ef2122658a3692.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/enriched.el | 10 |
2 files changed, 19 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e6a762003a1..252445a2bd2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2002-03-24 Eli Zaretskii <eliz@is.elta.co.il> | ||
| 2 | |||
| 3 | * facemenu.el (facemenu-get-face): Remove unised variable | ||
| 4 | `foreground'. | ||
| 5 | |||
| 6 | * enriched.el (enriched-face-ans): Support FACE of the form | ||
| 7 | (:foreground COLOR) and (:background COLOR). | ||
| 8 | (enriched-decode-foreground, enriched-decode-background): Set the | ||
| 9 | fore- and background colors of the faces we create, since facemenu | ||
| 10 | doesn't. | ||
| 11 | |||
| 1 | 2002-03-24 Pavel Jan,Bm(Bk <Pavel@Janik.cz> | 12 | 2002-03-24 Pavel Jan,Bm(Bk <Pavel@Janik.cz> |
| 2 | 13 | ||
| 3 | * mwheel.el (mouse-wheel-mode): Use the result of | 14 | * 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." | |||
| 341 | (list (list "x-color" (cdr face)))) | 341 | (list (list "x-color" (cdr face)))) |
| 342 | ((and (consp face) (eq (car face) 'background-color)) | 342 | ((and (consp face) (eq (car face) 'background-color)) |
| 343 | (list (list "x-bg-color" (cdr face)))) | 343 | (list (list "x-bg-color" (cdr face)))) |
| 344 | ((and (listp face) (eq (car face) :foreground)) | ||
| 345 | (list (list "x-color" (cadr face)))) | ||
| 346 | ((and (listp face) (eq (car face) :background)) | ||
| 347 | (list (list "x-bg-color" (cadr face)))) | ||
| 344 | ((listp face) | 348 | ((listp face) |
| 345 | (apply 'append (mapcar 'enriched-face-ans face))) | 349 | (apply 'append (mapcar 'enriched-face-ans face))) |
| 346 | ((string-match "^fg:" (symbol-name face)) | 350 | ((string-match "^fg:" (symbol-name face)) |
| @@ -436,7 +440,8 @@ Return value is \(begin end name positive-p), or nil if none was found." | |||
| 436 | (cond ((null color) | 440 | (cond ((null color) |
| 437 | (message "Warning: no color specified for <x-color>")) | 441 | (message "Warning: no color specified for <x-color>")) |
| 438 | ((facep face)) | 442 | ((facep face)) |
| 439 | ((and (display-color-p) (facemenu-get-face face))) | 443 | ((and (display-color-p) (facemenu-get-face face)) |
| 444 | (set-face-foreground face color)) | ||
| 440 | ((make-face face) | 445 | ((make-face face) |
| 441 | (message "Warning: color `%s' can't be displayed" color))) | 446 | (message "Warning: color `%s' can't be displayed" color))) |
| 442 | (list from to 'face face))) | 447 | (list from to 'face face))) |
| @@ -446,7 +451,8 @@ Return value is \(begin end name positive-p), or nil if none was found." | |||
| 446 | (cond ((null color) | 451 | (cond ((null color) |
| 447 | (message "Warning: no color specified for <x-bg-color>")) | 452 | (message "Warning: no color specified for <x-bg-color>")) |
| 448 | ((facep face)) | 453 | ((facep face)) |
| 449 | ((and (display-color-p) (facemenu-get-face face))) | 454 | ((and (display-color-p) (facemenu-get-face face)) |
| 455 | (set-face-background face color)) | ||
| 450 | ((make-face face) | 456 | ((make-face face) |
| 451 | (message "Warning: color `%s' can't be displayed" color))) | 457 | (message "Warning: color `%s' can't be displayed" color))) |
| 452 | (list from to 'face face))) | 458 | (list from to 'face face))) |