Mercurial > hg > xemacs-beta
changeset 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 | ff037e1dc33c |
children | 4cf435fcebbc |
files | lisp/ChangeLog lisp/faces.el |
diffstat | 2 files changed, 28 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Nov 12 00:00:11 2009 +0900 +++ b/lisp/ChangeLog Sat Nov 14 11:32:10 2009 +0000 @@ -1,3 +1,10 @@ +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 + 2009-11-09 Didier Verna <didier@xemacs.org> * minibuf.el (read-buffer): New optional argument 'exclude' for
--- 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.