diff options
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) |