emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog faces.el


From: Jason Rumney
Subject: [Emacs-diffs] emacs/lisp ChangeLog faces.el
Date: Mon, 13 Apr 2009 14:06:52 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Jason Rumney <jasonr>   09/04/13 14:06:51

Modified files:
        lisp           : ChangeLog faces.el 

Log message:
        (frame-set-background-mode): Window system frames
        default to light. Use default in cases where specified color
        does not exist (Bug#2969).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15583&r2=1.15584
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/faces.el?cvsroot=emacs&r1=1.439&r2=1.440

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15583
retrieving revision 1.15584
diff -u -b -r1.15583 -r1.15584
--- ChangeLog   13 Apr 2009 12:59:07 -0000      1.15583
+++ ChangeLog   13 Apr 2009 14:06:48 -0000      1.15584
@@ -1,3 +1,9 @@
+2009-04-13  Jason Rumney  <address@hidden>
+
+       * faces.el (frame-set-background-mode): Window system frames
+       default to light. Use default in cases where specified color
+       does not exist (Bug#2969).
+
 2009-04-13  Kenichi Handa  <address@hidden>
 
        * language/japanese.el (cp932): Delete alias for

Index: faces.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/faces.el,v
retrieving revision 1.439
retrieving revision 1.440
diff -u -b -r1.439 -r1.440
--- faces.el    16 Mar 2009 20:46:59 -0000      1.439
+++ faces.el    13 Apr 2009 14:06:51 -0000      1.440
@@ -1847,28 +1847,22 @@
           (bg-color (frame-parameter frame 'background-color))
           (terminal-bg-mode (terminal-parameter frame 'background-mode))
           (tty-type (tty-type frame))
+          (default-bg-mode
+            (if (or (window-system frame)
+                    (and tty-type
+                         (string-match "^\\(xterm\\|\\rxvt\\|dtterm\\|eterm\\)"
+                                       tty-type)))
+                'light
+              'dark))
+          (non-default-bg-mode (if (eq default-bg-mode 'light) 'dark 'light))
           (bg-mode
            (cond (frame-background-mode)
                  (bg-resource (intern (downcase bg-resource)))
                  (terminal-bg-mode)
-                 ((and (null (window-system frame))
-                       ;; Unspecified frame background color can only
-                       ;; happen on tty's.
-                       (member bg-color '(nil unspecified "unspecified-bg")))
-                  ;; There is no way to determine the background mode
-                  ;; automatically, so we make a guess based on the
-                  ;; terminal type.
-                  (if (and tty-type
-                           (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)"
-                                         tty-type))
-                      'light
-                    'dark))
                  ((equal bg-color "unspecified-fg") ; inverted colors
-                  (if (and tty-type
-                           (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)"
-                                         tty-type))
-                      'dark
-                    'light))
+                  non-default-bg-mode)
+                 ((not (color-values bg-color frame))
+                  default-bg-mode)
                  ((>= (apply '+ (color-values bg-color frame))
                       ;; Just looking at the screen, colors whose
                       ;; values add up to .6 of the white total




reply via email to

[Prev in Thread] Current Thread [Next in Thread]