changeset 4676:e3feb329bda9

Make the initialisation of xpm-color-symbols a bit more reasonable. 2009-08-16 Aidan Kehoe <kehoea@parhasard.net> * faces.el (xpm-color-symbols): Call (featurep 'x) when faces.elc is dumped, not repeatedly (myriad times) at image instantiation time.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 16 Aug 2009 14:58:57 +0100
parents 9a1a59b4b75d
children 8f1ee2d15784
files lisp/ChangeLog lisp/faces.el
diffstat 2 files changed, 20 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Aug 14 19:14:51 2009 +0100
+++ b/lisp/ChangeLog	Sun Aug 16 14:58:57 2009 +0100
@@ -1,3 +1,9 @@
+2009-08-16  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* faces.el (xpm-color-symbols): 
+	Call (featurep 'x) when faces.elc is dumped, not repeatedly
+	(myriad times) at image instantiation time.
+
 2009-08-14  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* minibuf.el (read-from-minibuffer): 
--- a/lisp/faces.el	Fri Aug 14 19:14:51 2009 +0100
+++ b/lisp/faces.el	Sun Aug 16 14:58:57 2009 +0100
@@ -2068,24 +2068,20 @@
         (list
          '("foreground" (face-foreground 'default))
          '("background" (face-background 'default))
-         '("backgroundToolBarColor"
-           (or
-            (and
-             (featurep 'x)
-             (x-get-resource "backgroundToolBarColor"
-                             "BackgroundToolBarColor" 'string
-                             nil nil 'warn))
-
-            (face-background 'toolbar)))
-         '("foregroundToolBarColor"
-           (or
-            (and
-            (featurep 'x)
-            (x-get-resource "foregroundToolBarColor"
-                            "ForegroundToolBarColor" 'string
-                            nil nil 'warn))
-            (face-foreground 'toolbar)))
-         )))
+         `("backgroundToolBarColor"
+           ,(if (featurep 'x)
+		'(or (x-get-resource "backgroundToolBarColor"
+				     "BackgroundToolBarColor" 'string
+				     nil nil 'warn)
+		  (face-background 'toolbar))
+	      '(face-background 'toolbar)))
+         `("foregroundToolBarColor"
+           ,(if (featurep 'x)
+		'(or (x-get-resource "foregroundToolBarColor"
+				     "ForegroundToolBarColor" 'string
+				     nil nil 'warn)
+		  (face-foreground 'toolbar))
+	      '(face-foreground 'toolbar))))))
 
 (when (featurep 'tty)
   (set-face-highlight-p 'bold                    t 'global '(default tty))