comparison lisp/faces.el @ 32649:47bf921bccd5

(frame-set-background-mode): `unspecified' &c are symbols, not strings.
author Miles Bader <miles@gnu.org>
date Thu, 19 Oct 2000 08:36:13 +0000
parents 48709f040160
children 92b46ad86f6a
comparison
equal deleted inserted replaced
32648:dd02ab7a6392 32649:47bf921bccd5
1302 (choice-item light) 1302 (choice-item light)
1303 (choice-item :tag "default" nil))) 1303 (choice-item :tag "default" nil)))
1304 1304
1305 1305
1306 (defun frame-set-background-mode (frame) 1306 (defun frame-set-background-mode (frame)
1307 "Set up the `background-mode' and `display-type' frame parameters for FRAME." 1307 "Set up display-dependent faces on FRAME.
1308 Display-dependent faces are those which have different definitions
1309 according to the `background-mode' and `display-type' frame parameters."
1308 (let* ((bg-resource 1310 (let* ((bg-resource
1309 (and window-system 1311 (and window-system
1310 (x-get-resource ".backgroundMode" "BackgroundMode"))) 1312 (x-get-resource ".backgroundMode" "BackgroundMode")))
1311 (bg-color (frame-parameter frame 'background-color)) 1313 (bg-color (frame-parameter frame 'background-color))
1312 (bg-mode 1314 (bg-mode
1316 ((and (null window-system) (null bg-color)) 1318 ((and (null window-system) (null bg-color))
1317 ;; No way to determine this automatically (?). 1319 ;; No way to determine this automatically (?).
1318 'dark) 1320 'dark)
1319 ;; Unspecified frame background color can only happen 1321 ;; Unspecified frame background color can only happen
1320 ;; on tty's. 1322 ;; on tty's.
1321 ((memq bg-color '("unspecified" "unspecified-bg")) 1323 ((memq bg-color '(unspecified unspecified-bg))
1322 'dark) 1324 'dark)
1323 ((eq bg-color "unspecified-fg") ; inverted colors 1325 ((eq bg-color 'unspecified-fg) ; inverted colors
1324 'light) 1326 'light)
1325 ((>= (apply '+ (x-color-values bg-color frame)) 1327 ((>= (apply '+ (x-color-values bg-color frame))
1326 ;; Just looking at the screen, colors whose 1328 ;; Just looking at the screen, colors whose
1327 ;; values add up to .6 of the white total 1329 ;; values add up to .6 of the white total
1328 ;; still look dark to me. 1330 ;; still look dark to me.