diff lisp/faces.el @ 263:727739f917cb r20-5b30

Import from CVS: tag r20-5b30
author cvs
date Mon, 13 Aug 2007 10:24:41 +0200
parents 0e522484dd2a
children 8efd647ea9ca
line wrap: on
line diff
--- a/lisp/faces.el	Mon Aug 13 10:23:52 2007 +0200
+++ b/lisp/faces.el	Mon Aug 13 10:24:41 2007 +0200
@@ -966,11 +966,11 @@
        (set-face-highlight-p face t locale 'tty)))
    (lambda ()
      ;; handle X specific entries
-     (cond ((featurep 'x)
-	    (frob-face-property face 'font 'x-make-font-bold locale))
-	   ((featurep 'mswindows)
-	    (frob-face-property face 'font 'mswindows-make-font-bold locale))
-	   ))
+     (when (featurep 'x)
+       (frob-face-property face 'font 'x-make-font-bold locale))
+     (when (featurep 'mswindows)
+       (frob-face-property face 'font 'mswindows-make-font-bold locale))
+     )
    '(([default] . [bold])
      ([bold] . t)
      ([italic] . [bold-italic])
@@ -991,11 +991,11 @@
        (set-face-underline-p face t locale 'tty)))
    (lambda ()
      ;; handle X specific entries
-     (cond ((featurep 'x)
-	    (frob-face-property face 'font 'x-make-font-italic locale))
-	   ((featurep 'mswindows)
-	    (frob-face-property face 'font 'mswindows-make-font-italic locale))
-	   ))
+     (when (featurep 'x)
+       (frob-face-property face 'font 'x-make-font-italic locale))
+     (when (featurep 'mswindows)
+       (frob-face-property face 'font 'mswindows-make-font-italic locale))
+     )
    '(([default] . [italic])
      ([bold] . [bold-italic])
      ([italic] . t)
@@ -1017,11 +1017,11 @@
        (set-face-underline-p face t locale 'tty)))
    (lambda ()
      ;; handle X specific entries
-     (cond ((featurep 'x)
-	    (frob-face-property face 'font 'x-make-font-bold-italic locale))
-	   ((featurep 'mswindows)
-	    (frob-face-property face 'font 'mswindows-make-font-bold-italic locale))
-	   ))
+     (when (featurep 'x)
+       (frob-face-property face 'font 'x-make-font-bold-italic locale))
+     (when (featurep 'mswindows)
+       (frob-face-property face 'font 'mswindows-make-font-bold-italic locale))
+     )
    '(([default] . [italic])
      ([bold] . [bold-italic])
      ([italic] . [bold-italic])
@@ -1042,11 +1042,11 @@
        (set-face-highlight-p face nil locale 'tty)))
    (lambda ()
      ;; handle X specific entries
-     (cond ((featurep 'x)
-	    (frob-face-property face 'font 'x-make-font-unbold locale))
-	   ((featurep 'mswindows)
-	    (frob-face-property face 'font 'mswindows-make-font-unbold locale))
-	   ))
+     (when (featurep 'x)
+       (frob-face-property face 'font 'x-make-font-unbold locale))
+     (when (featurep 'mswindows)
+       (frob-face-property face 'font 'mswindows-make-font-unbold locale))
+     )
    '(([default] . t)
      ([bold] . [default])
      ([italic] . t)
@@ -1067,11 +1067,11 @@
        (set-face-underline-p face nil locale 'tty)))
    (lambda ()
      ;; handle X specific entries
-     (cond ((featurep 'x)
-	    (frob-face-property face 'font 'x-make-font-unitalic locale))
-	   ((featurep 'mswindows)
-	    (frob-face-property face 'font 'mswindows-make-font-unitalic locale))
-	   ))
+     (when (featurep 'x)
+       (frob-face-property face 'font 'x-make-font-unitalic locale))
+     (when (featurep 'mswindows)
+       (frob-face-property face 'font 'mswindows-make-font-unitalic locale))
+     )
    '(([default] . t)
      ([bold] . t)
      ([italic] . [default])
@@ -1088,20 +1088,20 @@
 because they don't make sense in this context."
   (interactive (list (read-face-name "Shrink which face: ")))
   ;; handle X specific entries
-  (cond ((featurep 'x)
-	 (frob-face-property face 'font 'x-find-smaller-font locale))
-	((featurep 'mswindows)
-	 (frob-face-property face 'font 'mswindows-find-smaller-font locale))))
+  (when (featurep 'x)
+    (frob-face-property face 'font 'x-find-smaller-font locale))
+  (when (featurep 'mswindows)
+    (frob-face-property face 'font 'mswindows-find-smaller-font locale)))
 
 (defun make-face-larger (face &optional locale)
   "Make the font of the given face be larger, if possible.
 See `make-face-smaller' for the semantics of the LOCALE argument."
   (interactive (list (read-face-name "Enlarge which face: ")))
   ;; handle X specific entries
-  (cond ((featurep 'x)
-	 (frob-face-property face 'font 'x-find-larger-font locale))
-	((featurep 'mswindows)
-	 (frob-face-property face 'font 'mswindows-find-larger-font locale))))
+  (when (featurep 'x)
+    (frob-face-property face 'font 'x-find-larger-font locale))
+  (when (featurep 'mswindows)
+    (frob-face-property face 'font 'mswindows-find-larger-font locale)))
 
 (defun invert-face (face &optional locale)
   "Swap the foreground and background colors of the face."
@@ -1384,7 +1384,9 @@
   (loop for face in (face-list) do
 	(init-face-from-resources face 'global))
   ;; Further X frobbing.
-  (x-init-global-faces)
+  (case window-system
+    (x (x-init-global-faces))
+    (mswindows (mswindows-init-global-faces)))
   ;; for bold and the like, make the global specification be bold etc.
   ;; if the user didn't already specify a value.  These will also be
   ;; frobbed further in init-other-random-faces.