Mercurial > emacs
comparison lisp/faces.el @ 31451:0f9e55c33cc5
(frame-set-background-mode): Use frame-parameter
instead of frame-parameters.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 07 Sep 2000 11:39:31 +0000 |
parents | d7a98f35b441 |
children | 159470ebe092 |
comparison
equal
deleted
inserted
replaced
31450:82556406aa45 | 31451:0f9e55c33cc5 |
---|---|
1300 (defun frame-set-background-mode (frame) | 1300 (defun frame-set-background-mode (frame) |
1301 "Set up the `background-mode' and `display-type' frame parameters for FRAME." | 1301 "Set up the `background-mode' and `display-type' frame parameters for FRAME." |
1302 (let* ((bg-resource | 1302 (let* ((bg-resource |
1303 (and window-system | 1303 (and window-system |
1304 (x-get-resource ".backgroundMode" "BackgroundMode"))) | 1304 (x-get-resource ".backgroundMode" "BackgroundMode"))) |
1305 (params (frame-parameters frame)) | |
1306 (bg-mode (cond (frame-background-mode) | 1305 (bg-mode (cond (frame-background-mode) |
1307 ((null window-system) | 1306 ((null window-system) |
1308 ;; No way to determine this automatically (?). | 1307 ;; No way to determine this automatically (?). |
1309 'dark) | 1308 'dark) |
1310 (bg-resource | 1309 (bg-resource |
1311 (intern (downcase bg-resource))) | 1310 (intern (downcase bg-resource))) |
1312 ((< (apply '+ (x-color-values | 1311 ((< (apply '+ (x-color-values |
1313 (cdr (assq 'background-color | 1312 (frame-parameter frame 'background-color) |
1314 params)) | |
1315 frame)) | 1313 frame)) |
1316 ;; Just looking at the screen, colors whose | 1314 ;; Just looking at the screen, colors whose |
1317 ;; values add up to .6 of the white total | 1315 ;; values add up to .6 of the white total |
1318 ;; still look dark to me. | 1316 ;; still look dark to me. |
1319 (* (apply '+ (x-color-values "white" frame)) .6)) | 1317 (* (apply '+ (x-color-values "white" frame)) .6)) |