# HG changeset patch # User Miles Bader # Date 972167262 0 # Node ID 92b46ad86f6aa3e16b431898d8b803a415d2a6a0 # Parent b8e798d157161ef6c3181d80034d3af3ef11c193 (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. diff -r b8e798d15716 -r 92b46ad86f6a lisp/faces.el --- 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