]> git.eshelyaron.com Git - emacs.git/commitdiff
(frame-set-background-mode): Don't do anythung for text-only or MSDOS frame.
authorRichard M. Stallman <rms@gnu.org>
Sat, 10 Oct 1998 12:10:30 +0000 (12:10 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 10 Oct 1998 12:10:30 +0000 (12:10 +0000)
lisp/faces.el

index 4a7d951aeacf2350e501b2cbc05cc3d6a9ca90ab..2a817eba10647fe1cbd7247ecfc344d194a55059 100644 (file)
@@ -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)