Index: src/faces.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs-20/src/faces.c,v retrieving revision 1.22 diff -u -r1.22 faces.c --- src/faces.c 1998/05/16 05:07:03 1.22 +++ src/faces.c 1998/05/19 23:58:27 @@ -54,13 +54,13 @@ /* These faces are used directly internally. We use these variables to be able to reference them directly and save the overhead of calling Ffind_face. */ -Lisp_Object Vdefault_face, Vmodeline_face; +Lisp_Object Vdefault_face, Vmodeline_face, Vwidget_face; Lisp_Object Vleft_margin_face, Vright_margin_face, Vtext_cursor_face; Lisp_Object Vpointer_face; Lisp_Object Vvertical_divider_face; /* Qdefault, Qhighlight defined in general.c */ -Lisp_Object Qmodeline, Qleft_margin, Qright_margin, Qtext_cursor; +Lisp_Object Qmodeline, Qwidget, Qleft_margin, Qright_margin, Qtext_cursor; Lisp_Object Qvertical_divider; /* In the old implementation Vface_list was a list of the face names, @@ -1752,6 +1752,7 @@ { /* Qdefault defined in general.c */ defsymbol (&Qmodeline, "modeline"); + defsymbol (&Qwidget, "widget"); defsymbol (&Qleft_margin, "left-margin"); defsymbol (&Qright_margin, "right-margin"); defsymbol (&Qtext_cursor, "text-cursor"); @@ -1804,6 +1805,8 @@ staticpro (&Vdefault_face); Vdefault_face = Qnil; + staticpro (&Vwidget_face); + Vwidget_face = Qnil; staticpro (&Vmodeline_face); Vmodeline_face = Qnil; @@ -1934,11 +1937,28 @@ set_specifier_fallback (Fget (Vdefault_face, Qreverse, Qnil), list1 (Fcons (Qnil, Qnil))); + /* mustn't inherit bg pixmaps from the default face */ + Vwidget_face = Fmake_face (Qwidget, build_string ("widget face"), + Qnil); + + set_specifier_fallback (Fget (Vwidget_face, Qbackground_pixmap, + Qunbound), + list1 (Fcons (Qnil, vector1 (Qnothing)))); /* Now create the other faces that redisplay needs to refer to directly. We could create them in Lisp but it's simpler this way since we need to get them anyway. */ Vmodeline_face = Fmake_face (Qmodeline, build_string ("modeline face"), Qnil); + + /* modeline-face should not inherit colors from the default face. */ + set_specifier_fallback (Fget (Vmodeline_face, Qforeground, Qunbound), + Fget (Vwidget_face, Qforeground, Qunbound)); + set_specifier_fallback (Fget (Vmodeline_face, Qbackground, Qunbound), + Fget (Vwidget_face, Qbackground, Qunbound)); + set_specifier_fallback (Fget (Vmodeline_face, Qbackground_pixmap, + Qnil), + Fget (Vwidget_face, Qbackground_pixmap, Qunbound)); + Vvertical_divider_face = Fmake_face (Qvertical_divider, build_string ("vertical divider face"), Qnil); @@ -1946,12 +1966,12 @@ Perhaps there must be a 3d-object-face to supply default foreground, background and pixmap. */ set_specifier_fallback (Fget (Vvertical_divider_face, Qforeground, Qunbound), - Fget (Vmodeline_face, Qforeground, Qunbound)); + Fget (Vwidget_face, Qforeground, Qunbound)); set_specifier_fallback (Fget (Vvertical_divider_face, Qbackground, Qunbound), - Fget (Vmodeline_face, Qbackground, Qunbound)); + Fget (Vwidget_face, Qbackground, Qunbound)); set_specifier_fallback (Fget (Vvertical_divider_face, Qbackground_pixmap, Qunbound), - Fget (Vdefault_face, Qbackground_pixmap, Qunbound)); + Fget (Vwidget_face, Qbackground_pixmap, Qunbound)); Vleft_margin_face = Fmake_face (Qleft_margin, build_string ("left margin face"), Index: lisp/faces.el =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/faces.el,v retrieving revision 1.13 diff -u -r1.13 faces.el --- lisp/faces.el 1998/05/14 04:46:02 1.13 +++ lisp/faces.el 1998/05/19 23:58:30 @@ -770,6 +770,11 @@ See `face-property-instance' for the semantics of the DOMAIN argument." (not (face-equal face 'default domain))) +; moved from x-faces.el +(defun try-font-name (name &optional device) + ;; yes, name really should be here twice. + (and name (make-font-instance name device t) name)) + ;; This function is a terrible, disgusting hack!!!! Need to ;; separate out the font elements as separate face properties! @@ -1585,6 +1590,17 @@ (set-face-background 'text-cursor '(((x default) . "Red3") ((mswindows default) . "Red3")) + 'global) + +;; widget face +(set-face-foreground 'widget + '(((default color x) . "Gray30") + ((default color mswindows) . "Black")) + 'global) + +(set-face-background 'widget + '(((default color x) . "Gray80") + ((default color mswindows) . "Gray75")) 'global) ;; some older X servers don't recognize "darkseagreen2" Index: lisp/msw-faces.el =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/msw-faces.el,v retrieving revision 1.6 diff -u -r1.6 msw-faces.el --- lisp/msw-faces.el 1998/05/05 21:49:31 1.6 +++ lisp/msw-faces.el 1998/05/19 23:58:31 @@ -32,15 +32,10 @@ ;;; ensure that the default face has some reasonable fallbacks if nothing ;;; else is specified. (defun mswindows-init-device-faces (device) - (or (face-font 'default 'global) - (set-face-font 'default "Courier New:Regular:10") - 'global) - (or (face-foreground 'default 'global) - (set-face-foreground 'default "black" 'global 'mswindows)) - (or (face-background 'default 'global) - (set-face-background 'default "white" 'global 'mswindows)) - (or (face-background 'modeline 'global) - (set-face-background 'modeline "grey75" 'global 'mswindows)) + (set-face-font 'default + '((mswindows default) . "Courier New:Regular:10") 'global) + (set-face-foreground 'default '((mswindows default) . "black") 'global) + (set-face-background 'default '((mswindows default) . "white") 'global) )