aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2000-01-03 16:58:20 +0000
committerEli Zaretskii2000-01-03 16:58:20 +0000
commit293b4814872b0c05efe99fb11cb6df5888d975f7 (patch)
treea806ff1c70f5642c880bf734fb46ff4a2f8e0fce
parent24480d5b0868b4140b33a1fe2257f52f331f05bf (diff)
downloademacs-293b4814872b0c05efe99fb11cb6df5888d975f7.tar.gz
emacs-293b4814872b0c05efe99fb11cb6df5888d975f7.zip
(face-read-integer, read-face-attribute)
(color-defined-p, color-values): unspecified-{f,b}g are now strings.
-rw-r--r--lisp/faces.el25
1 files changed, 14 insertions, 11 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 01779d0358f..9ac4e020223 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -828,14 +828,15 @@ value to return if no new value is entered. NAME is a descriptive
828name of the attribute for prompting. Value is the new attribute value." 828name of the attribute for prompting. Value is the new attribute value."
829 (let ((new-value 829 (let ((new-value
830 (face-read-string face 830 (face-read-string face
831 (if (memq 831 (if (memq default
832 default 832 '(unspecified
833 '(unspecified unspecified-fg unspecified-bg)) 833 "unspecified-fg"
834 "unspecified-bg"))
834 default 835 default
835 (int-to-string default)) 836 (int-to-string default))
836 name 837 name
837 (list (cons "unspecified" 'unspecified))))) 838 (list (cons "unspecified" 'unspecified)))))
838 (if (memq new-value '(unspecified unspecified-fg unspecified-bg)) 839 (if (memq new-value '(unspecified "unspecified-fg" "unspecified-bg"))
839 new-value 840 new-value
840 (string-to-int new-value)))) 841 (string-to-int new-value))))
841 842
@@ -866,7 +867,9 @@ of a global face. Value is the new attribute value."
866 (if (and (memq attribute '(:foreground :background)) 867 (if (and (memq attribute '(:foreground :background))
867 (not (memq window-system '(x w32 mac))) 868 (not (memq window-system '(x w32 mac)))
868 (not (memq new-value 869 (not (memq new-value
869 '(unspecified unspecified-fg unspecified-bg)))) 870 '(unspecified
871 "unspecified-fg"
872 "unspecified-bg"))))
870 (setq new-value (car (tty-color-desc new-value frame)))) 873 (setq new-value (car (tty-color-desc new-value frame))))
871 (unless (eq new-value 'unspecified) 874 (unless (eq new-value 'unspecified)
872 (setq new-value (cdr (assoc new-value valid))))) 875 (setq new-value (cdr (assoc new-value valid)))))
@@ -1168,9 +1171,9 @@ If FRAME doesn't support colors, the value is nil."
1168(defun color-defined-p (color &optional frame) 1171(defun color-defined-p (color &optional frame)
1169 "Return non-nil if color COLOR is supported on frame FRAME. 1172 "Return non-nil if color COLOR is supported on frame FRAME.
1170If FRAME is omitted or nil, use the selected frame. 1173If FRAME is omitted or nil, use the selected frame.
1171If COLOR is one of the symbols `unspecified', `unspecified-fg', or 1174If COLOR is the symbol `unspecified' or one of the strings
1172`unspecified-bg', the value is nil." 1175\"unspecified-fg\" or \"unspecified-bg\", the value is nil."
1173 (if (memq color '(unspecified unspecified-bg unspecified-fg)) 1176 (if (memq color '(unspecified "unspecified-bg" "unspecified-fg"))
1174 nil 1177 nil
1175 (if (memq (framep (or frame (selected-frame))) '(x w32)) 1178 (if (memq (framep (or frame (selected-frame))) '(x w32))
1176 (xw-color-defined-p color frame) 1179 (xw-color-defined-p color frame)
@@ -1184,9 +1187,9 @@ These values appear to range from 0 to 65280 or 65535, depending
1184on the system; white is \(65280 65280 65280\) or \(65535 65535 65535\). 1187on the system; white is \(65280 65280 65280\) or \(65535 65535 65535\).
1185If FRAME is omitted or nil, use the selected frame. 1188If FRAME is omitted or nil, use the selected frame.
1186If FRAME cannot display COLOR, the value is nil. 1189If FRAME cannot display COLOR, the value is nil.
1187If COLOR is one of the symbols `unspecified', `unspecified-fg', or 1190If COLOR is the symbol `unspecified' or one of the strings
1188`unspecified-bg', the value is nil." 1191\"unspecified-fg\" or \"unspecified-bg\", the value is nil."
1189 (if (memq color '(unspecified unspecified-fg unspecified-bg)) 1192 (if (memq color '(unspecified "unspecified-fg" "unspecified-bg"))
1190 nil 1193 nil
1191 (if (memq (framep (or frame (selected-frame))) '(x w32)) 1194 (if (memq (framep (or frame (selected-frame))) '(x w32))
1192 (xw-color-values color frame) 1195 (xw-color-values color frame)