diff options
| author | Eli Zaretskii | 1999-12-15 13:14:38 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 1999-12-15 13:14:38 +0000 |
| commit | f9d2fdc464f130fbde700cecc00c031ef7e8e4f2 (patch) | |
| tree | 2102159b730a603bb26d4e7d5162211d958058d7 /lisp | |
| parent | e19539f184768f9411860daf9ef9d983e48e2650 (diff) | |
| download | emacs-f9d2fdc464f130fbde700cecc00c031ef7e8e4f2.tar.gz emacs-f9d2fdc464f130fbde700cecc00c031ef7e8e4f2.zip | |
Changes for separate unspecified foreground and background colors
on character terminals:
* dispextern.h (FACE_TTY_DEFAULT_FG_COLOR)
(FACE_TTY_DEFAULT_BG_COLOR): New macros.
* xfaces.c (Qunspecified_fg, Qunspecified_bg): New variables.
(syms_of_xfaces): Initialize and staticpro them.
(tty_defined_color): If the color name is unspecified-fg or
unspecified-bg, return FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR, respectively, as the pixel value.
(tty_color_name): If the color pixel value is either
FACE_TTY_DEFAULT_FG_COLOR or FACE_TTY_DEFAULT_BG_COLOR, return
Qunspecified_fg or Qunspecified_bg, respectively.
(Finternal_set_lisp_face_attribute): Allow values Qunspecified_fg
and Qunspecified_bg for foreground and background colors.
(realize_default_face): If the foreground and background colors
are not specified, default to Qunspecified_fg and Qunspecified_bg.
(realize_tty_face): By default, set the face colors to
FACE_TTY_DEFAULT_FG_COLOR and FACE_TTY_DEFAULT_BG_COLOR.
[MSDOS]: Handle FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR when face colors are not defined.
Reverse the colors if the default colors were reversed.
* dispnew.c (init_display): Initialize the frame pixels of the
initial frame to FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR.
* term.c (turn_on_face): If the default fore- and background
colors are reversed, enter inverse video mode. Don't send color
escape sequences for unspecified foreground and background colors.
(turn_off_face): Handle unspecified-fg and unspecified-bg colors.
* dosfns.c (unspecified_colors): New variable.
(msdos_stdcolor_idx): Handle unspecified-fg and unspecified-bg
color names, return FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR, respectively.
(msdos_stdcolor_name): Handle FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR, return Qunspecified_fg and
Qunspecified_bg, respectively.
* msdos.c (IT_set_face): Support FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR as pixel values.
* faces.el (face-read-integer, read-face-attribute)
(color-defined-p, color-values): Allow color values unspecified-fg
and unspecified-bg, handle them as unspecified.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/faces.el | 21 |
2 files changed, 19 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 40e6d0ccb80..799ed3b55b9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 1999-12-15 Eli Zaretskii <eliz@is.elta.co.il> | ||
| 2 | |||
| 3 | * faces.el (face-read-integer, read-face-attribute) | ||
| 4 | (color-defined-p, color-values): Allow color values unspecified-fg | ||
| 5 | and unspecified-bg, handle them as unspecified. | ||
| 6 | |||
| 1 | 1999-12-15 Kenichi Handa <handa@etl.go.jp> | 7 | 1999-12-15 Kenichi Handa <handa@etl.go.jp> |
| 2 | 8 | ||
| 3 | The following changes are for the new composition mechanism. We | 9 | The following changes are for the new composition mechanism. We |
diff --git a/lisp/faces.el b/lisp/faces.el index 80ed7fc12a7..f4e071222d3 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -827,12 +827,14 @@ value to return if no new value is entered. NAME is a descriptive | |||
| 827 | name of the attribute for prompting. Value is the new attribute value." | 827 | name of the attribute for prompting. Value is the new attribute value." |
| 828 | (let ((new-value | 828 | (let ((new-value |
| 829 | (face-read-string face | 829 | (face-read-string face |
| 830 | (if (eq default 'unspecified) | 830 | (if (memq |
| 831 | 'unspecified | 831 | default |
| 832 | '(unspecified unspecified-fg unspecified-bg)) | ||
| 833 | default | ||
| 832 | (int-to-string default)) | 834 | (int-to-string default)) |
| 833 | name | 835 | name |
| 834 | (list (cons "unspecified" 'unspecified))))) | 836 | (list (cons "unspecified" 'unspecified))))) |
| 835 | (if (eq new-value 'unspecified) | 837 | (if (memq new-value '(unspecified unspecified-fg unspecified-bg)) |
| 836 | new-value | 838 | new-value |
| 837 | (string-to-int new-value)))) | 839 | (string-to-int new-value)))) |
| 838 | 840 | ||
| @@ -862,7 +864,8 @@ of a global face. Value is the new attribute value." | |||
| 862 | ;; in tty-colors.el. | 864 | ;; in tty-colors.el. |
| 863 | (if (and (memq attribute '(:foreground :background)) | 865 | (if (and (memq attribute '(:foreground :background)) |
| 864 | (not (memq window-system '(x w32 mac))) | 866 | (not (memq window-system '(x w32 mac))) |
| 865 | (not (eq new-value 'unspecified))) | 867 | (not (memq new-value |
| 868 | '(unspecified unspecified-fg unspecified-bg)))) | ||
| 866 | (setq new-value (car (tty-color-desc new-value)))) | 869 | (setq new-value (car (tty-color-desc new-value)))) |
| 867 | (unless (eq new-value 'unspecified) | 870 | (unless (eq new-value 'unspecified) |
| 868 | (setq new-value (cdr (assoc new-value valid))))) | 871 | (setq new-value (cdr (assoc new-value valid))))) |
| @@ -1164,8 +1167,9 @@ If FRAME doesn't support colors, the value is nil." | |||
| 1164 | (defun color-defined-p (color &optional frame) | 1167 | (defun color-defined-p (color &optional frame) |
| 1165 | "Return non-nil if color COLOR is supported on frame FRAME. | 1168 | "Return non-nil if color COLOR is supported on frame FRAME. |
| 1166 | If FRAME is omitted or nil, use the selected frame. | 1169 | If FRAME is omitted or nil, use the selected frame. |
| 1167 | If COLOR is the symbol `unspecified', the value is nil." | 1170 | If COLOR is one of the symbols `unspecified', `unspecified-fg', or |
| 1168 | (if (eq color 'unspecified) | 1171 | `unspecified-bg', the value is nil." |
| 1172 | (if (memq color '(unspecified unspecified-bg unspecified-fg)) | ||
| 1169 | nil | 1173 | nil |
| 1170 | (if (memq (framep (or frame (selected-frame))) '(x w32)) | 1174 | (if (memq (framep (or frame (selected-frame))) '(x w32)) |
| 1171 | (xw-color-defined-p color frame) | 1175 | (xw-color-defined-p color frame) |
| @@ -1179,8 +1183,9 @@ These values appear to range from 0 to 65280 or 65535, depending | |||
| 1179 | on the system; white is \(65280 65280 65280\) or \(65535 65535 65535\). | 1183 | on the system; white is \(65280 65280 65280\) or \(65535 65535 65535\). |
| 1180 | If FRAME is omitted or nil, use the selected frame. | 1184 | If FRAME is omitted or nil, use the selected frame. |
| 1181 | If FRAME cannot display COLOR, the value is nil. | 1185 | If FRAME cannot display COLOR, the value is nil. |
| 1182 | If COLOR is the symbol `unspecified', the value is nil." | 1186 | If COLOR is one of the symbols `unspecified', `unspecified-fg', or |
| 1183 | (if (eq color 'unspecified) | 1187 | `unspecified-bg', the value is nil." |
| 1188 | (if (memq color '(unspecified unspecified-fg unspecified-bg)) | ||
| 1184 | nil | 1189 | nil |
| 1185 | (if (memq (framep (or frame (selected-frame))) '(x w32)) | 1190 | (if (memq (framep (or frame (selected-frame))) '(x w32)) |
| 1186 | (xw-color-values color frame) | 1191 | (xw-color-values color frame) |