aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2000-10-21 22:29:38 +0000
committerMiles Bader2000-10-21 22:29:38 +0000
commit1e221c163cd0ee5e24f621db993be334b87c1e09 (patch)
treeb2624d4b5ea95b14ac40eac526a6bf369140d244
parentb6ef48981a2ef87ca9b14ba003c39181cc1a16c8 (diff)
downloademacs-1e221c163cd0ee5e24f621db993be334b87c1e09.tar.gz
emacs-1e221c163cd0ee5e24f621db993be334b87c1e09.zip
(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.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/faces.el10
2 files changed, 15 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3f74bb92e86..8eea6d16c36 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12000-10-22 Miles Bader <miles@gnu.org>
2
3 * faces.el (color-values, color-defined-p): Use `member', not
4 `memq', because it works correctly for strings.
5 (frame-set-background-mode): Actually, "unspecified-fg" and
6 "unspecified-bg" *are* strings. Use `member', not `memq', and
7 `equal', not `eq', when a string value is possible.
8
12000-10-21 Eli Zaretskii <eliz@is.elta.co.il> 92000-10-21 Eli Zaretskii <eliz@is.elta.co.il>
2 10
3 * info.el (Info-file-list-for-emacs): Add an entry for Speedbar. 11 * info.el (Info-file-list-for-emacs): Add an entry for Speedbar.
@@ -35,6 +43,8 @@
35 43
36 * window.el (fit-window-to-buffer): New function. 44 * window.el (fit-window-to-buffer): New function.
37 (shrink-window-if-larger-than-buffer): Use it. 45 (shrink-window-if-larger-than-buffer): Use it.
46 (window-text-height): Don't expect minibuffers to have mode-lines.
47
38 * help.el (resize-temp-buffer-window): Use `fit-window-to-buffer'. 48 * help.el (resize-temp-buffer-window): Use `fit-window-to-buffer'.
39 * international/quail.el (quail-update-guidance): Use 49 * international/quail.el (quail-update-guidance): Use
40 `fit-window-to-buffer' instead of `set-window-text-height'. 50 `fit-window-to-buffer' instead of `set-window-text-height'.
diff --git a/lisp/faces.el b/lisp/faces.el
index 7a5881fb511..0d49650a509 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1241,9 +1241,9 @@ If FRAME doesn't support colors, the value is nil."
1241If FRAME is omitted or nil, use the selected frame. 1241If FRAME is omitted or nil, use the selected frame.
1242If COLOR is the symbol `unspecified' or one of the strings 1242If COLOR is the symbol `unspecified' or one of the strings
1243\"unspecified-fg\" or \"unspecified-bg\", the value is nil." 1243\"unspecified-fg\" or \"unspecified-bg\", the value is nil."
1244 (if (memq color '(unspecified "unspecified-bg" "unspecified-fg")) 1244 (if (member color '(unspecified "unspecified-bg" "unspecified-fg"))
1245 nil 1245 nil
1246 (if (memq (framep (or frame (selected-frame))) '(x w32)) 1246 (if (member (framep (or frame (selected-frame))) '(x w32))
1247 (xw-color-defined-p color frame) 1247 (xw-color-defined-p color frame)
1248 (numberp (tty-color-translate color frame))))) 1248 (numberp (tty-color-translate color frame)))))
1249(defalias 'x-color-defined-p 'color-defined-p) 1249(defalias 'x-color-defined-p 'color-defined-p)
@@ -1256,7 +1256,7 @@ If FRAME is omitted or nil, use the selected frame.
1256If FRAME cannot display COLOR, the value is nil. 1256If FRAME cannot display COLOR, the value is nil.
1257If COLOR is the symbol `unspecified' or one of the strings 1257If COLOR is the symbol `unspecified' or one of the strings
1258\"unspecified-fg\" or \"unspecified-bg\", the value is nil." 1258\"unspecified-fg\" or \"unspecified-bg\", the value is nil."
1259 (if (memq color '(unspecified "unspecified-fg" "unspecified-bg")) 1259 (if (member color '(unspecified "unspecified-fg" "unspecified-bg"))
1260 nil 1260 nil
1261 (if (memq (framep (or frame (selected-frame))) '(x w32)) 1261 (if (memq (framep (or frame (selected-frame))) '(x w32))
1262 (xw-color-values color frame) 1262 (xw-color-values color frame)
@@ -1320,9 +1320,9 @@ according to the `background-mode' and `display-type' frame parameters."
1320 'dark) 1320 'dark)
1321 ;; Unspecified frame background color can only happen 1321 ;; Unspecified frame background color can only happen
1322 ;; on tty's. 1322 ;; on tty's.
1323 ((memq bg-color '(unspecified unspecified-bg)) 1323 ((member bg-color '(unspecified "unspecified-bg"))
1324 'dark) 1324 'dark)
1325 ((eq bg-color 'unspecified-fg) ; inverted colors 1325 ((equal bg-color "unspecified-fg") ; inverted colors
1326 'light) 1326 'light)
1327 ((>= (apply '+ (x-color-values bg-color frame)) 1327 ((>= (apply '+ (x-color-values bg-color frame))
1328 ;; Just looking at the screen, colors whose 1328 ;; Just looking at the screen, colors whose