From: Richard M. Stallman Date: Sat, 10 Oct 1998 12:10:30 +0000 (+0000) Subject: (frame-set-background-mode): Don't do anythung for text-only or MSDOS frame. X-Git-Tag: emacs-20.4~1541 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=49cd149a22d82e22f0f293babc64b3e356410e02;p=emacs.git (frame-set-background-mode): Don't do anythung for text-only or MSDOS frame. --- diff --git a/lisp/faces.el b/lisp/faces.el index 4a7d951aeac..2a817eba106 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1457,30 +1457,31 @@ examine the brightness for you." (defun frame-set-background-mode (frame) "Set up the `background-mode' and `display-type' frame parameters for FRAME." - (let ((bg-resource (x-get-resource ".backgroundMode" - "BackgroundMode")) - (params (frame-parameters frame)) - (bg-mode)) - (setq bg-mode - (cond (frame-background-mode) - (bg-resource (intern (downcase bg-resource))) - ((< (apply '+ (x-color-values - (cdr (assq 'background-color params)) - frame)) - ;; Just looking at the screen, - ;; colors whose values add up to .6 of the white total - ;; still look dark to me. - (* (apply '+ (x-color-values "white" frame)) .6)) - 'dark) - (t 'light))) - (modify-frame-parameters frame - (list (cons 'background-mode bg-mode) - (cons 'display-type - (cond ((x-display-color-p frame) - 'color) - ((x-display-grayscale-p frame) - 'grayscale) - (t 'mono))))))) + (unless (memq (framep frame) '(t pc)) + (let ((bg-resource (x-get-resource ".backgroundMode" + "BackgroundMode")) + (params (frame-parameters frame)) + (bg-mode)) + (setq bg-mode + (cond (frame-background-mode) + (bg-resource (intern (downcase bg-resource))) + ((< (apply '+ (x-color-values + (cdr (assq 'background-color params)) + frame)) + ;; Just looking at the screen, + ;; colors whose values add up to .6 of the white total + ;; still look dark to me. + (* (apply '+ (x-color-values "white" frame)) .6)) + 'dark) + (t 'light))) + (modify-frame-parameters frame + (list (cons 'background-mode bg-mode) + (cons 'display-type + (cond ((x-display-color-p frame) + 'color) + ((x-display-grayscale-p frame) + 'grayscale) + (t 'mono)))))))) ;; Update a frame's faces when we change its default font. (defun frame-update-faces (frame) nil)