Mercurial > hg > xemacs-beta
diff lisp/faces.el @ 4741:e14f9fdd5096
Fix modeline-mousable, other faces that inherit from modeline, on startup.
2009-11-14 Aidan Kehoe <kehoea@parhasard.net>
* faces.el (init-other-random-faces):
If the modeline face is using its fallbacks, avoid that, specify
the corresponding problems instead. Fixes problems described in
http://mid.gmane.org/3ggprc2diyt.wl_Ron.Isaacson@morganstanley.com
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 14 Nov 2009 11:32:10 +0000 |
parents | e3feb329bda9 |
children | dec62ca5a899 |
line wrap: on
line diff
--- a/lisp/faces.el Thu Nov 12 00:00:11 2009 +0900 +++ b/lisp/faces.el Sat Nov 14 11:32:10 2009 +0000 @@ -1920,7 +1920,27 @@ (face-property-equal 'text-cursor 'default 'foreground device)) (set-face-foreground 'text-cursor [default background] 'global nil 'append)) - ) + + ;; The faces buffers-tab, modeline-mousable and modeline-buffer-id all + ;; inherit directly from modeline; they require that modeline's details be + ;; specified, that it not use fallbacks, otherwise *they* use the general + ;; fallback of the default face instead, which clashes with the gui + ;; element faces. So take the modeline face information from its + ;; fallbacks, themselves ultimately set up in faces.c: + (loop + for face-property in '(foreground background background-pixmap) + do (when (and (setq face-property (face-property 'modeline face-property)) + (null (specifier-instance face-property device nil t)) + (specifier-instance face-property device)) + (set-specifier face-property + (or (specifier-specs (specifier-fallback + face-property)) + ;; This will error at startup if the + ;; corresponding C fallback doesn't exist, + ;; which is well and good. + (specifier-fallback (specifier-fallback + face-property)))))) + nil) ;; New function with 20.1, suggested by Per Abrahamsen, coded by Kyle ;; Jones and Hrvoje Niksic.