# HG changeset patch # User Aidan Kehoe # Date 1258198330 0 # Node ID e14f9fdd5096a1e4eb875682bfc79d63778d1fa2 # Parent ff037e1dc33cb63dfe2577213b451a8bd37e9621 Fix modeline-mousable, other faces that inherit from modeline, on startup. 2009-11-14 Aidan Kehoe * 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 diff -r ff037e1dc33c -r e14f9fdd5096 lisp/ChangeLog --- 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 + + * 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 * minibuf.el (read-buffer): New optional argument 'exclude' for diff -r ff037e1dc33c -r e14f9fdd5096 lisp/faces.el --- 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.