changeset 32734:92b46ad86f6a

(color-values, color-defined-p): Use `member', not `memq', because it works correctly for strings. (frame-set-background-mode): Actually, "unspecified-fg" and "unspecified-bg" *are* strings. Use `member', not `memq', and `equal', not `eq', when a string value is possible.
author Miles Bader <miles@gnu.org>
date Sat, 21 Oct 2000 22:27:42 +0000
parents b8e798d15716
children 602b32e73777
files lisp/faces.el
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/faces.el	Sat Oct 21 19:54:53 2000 +0000
+++ b/lisp/faces.el	Sat Oct 21 22:27:42 2000 +0000
@@ -1241,9 +1241,9 @@
 If FRAME is omitted or nil, use the selected frame.
 If COLOR is the symbol `unspecified' or one of the strings
 \"unspecified-fg\" or \"unspecified-bg\", the value is nil."
-  (if (memq color '(unspecified "unspecified-bg" "unspecified-fg"))
+  (if (member color '(unspecified "unspecified-bg" "unspecified-fg"))
       nil
-    (if (memq (framep (or frame (selected-frame))) '(x w32))
+    (if (member (framep (or frame (selected-frame))) '(x w32))
 	(xw-color-defined-p color frame)
       (numberp (tty-color-translate color frame)))))
 (defalias 'x-color-defined-p 'color-defined-p)
@@ -1256,7 +1256,7 @@
 If FRAME cannot display COLOR, the value is nil.
 If COLOR is the symbol `unspecified' or one of the strings
 \"unspecified-fg\" or \"unspecified-bg\", the value is nil."
-  (if (memq color '(unspecified "unspecified-fg" "unspecified-bg"))
+  (if (member color '(unspecified "unspecified-fg" "unspecified-bg"))
       nil
     (if (memq (framep (or frame (selected-frame))) '(x w32))
 	(xw-color-values color frame)
@@ -1320,9 +1320,9 @@
 		 'dark)
 		;; Unspecified frame background color can only happen
 		;; on tty's.
-		((memq bg-color '(unspecified unspecified-bg))
+		((member bg-color '(unspecified "unspecified-bg"))
 		 'dark)
-		((eq bg-color 'unspecified-fg) ; inverted colors
+		((equal bg-color "unspecified-fg") ; inverted colors
 		 'light)
 		((>= (apply '+ (x-color-values bg-color frame))
 		    ;; Just looking at the screen, colors whose