Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
4740:ff037e1dc33c | 4741:e14f9fdd5096 |
---|---|
1918 (when (and (not (eq 'tty (device-type device))) | 1918 (when (and (not (eq 'tty (device-type device))) |
1919 (not (face-foreground 'text-cursor 'global)) | 1919 (not (face-foreground 'text-cursor 'global)) |
1920 (face-property-equal 'text-cursor 'default 'foreground device)) | 1920 (face-property-equal 'text-cursor 'default 'foreground device)) |
1921 (set-face-foreground 'text-cursor [default background] 'global | 1921 (set-face-foreground 'text-cursor [default background] 'global |
1922 nil 'append)) | 1922 nil 'append)) |
1923 ) | 1923 |
1924 ;; The faces buffers-tab, modeline-mousable and modeline-buffer-id all | |
1925 ;; inherit directly from modeline; they require that modeline's details be | |
1926 ;; specified, that it not use fallbacks, otherwise *they* use the general | |
1927 ;; fallback of the default face instead, which clashes with the gui | |
1928 ;; element faces. So take the modeline face information from its | |
1929 ;; fallbacks, themselves ultimately set up in faces.c: | |
1930 (loop | |
1931 for face-property in '(foreground background background-pixmap) | |
1932 do (when (and (setq face-property (face-property 'modeline face-property)) | |
1933 (null (specifier-instance face-property device nil t)) | |
1934 (specifier-instance face-property device)) | |
1935 (set-specifier face-property | |
1936 (or (specifier-specs (specifier-fallback | |
1937 face-property)) | |
1938 ;; This will error at startup if the | |
1939 ;; corresponding C fallback doesn't exist, | |
1940 ;; which is well and good. | |
1941 (specifier-fallback (specifier-fallback | |
1942 face-property)))))) | |
1943 nil) | |
1924 | 1944 |
1925 ;; New function with 20.1, suggested by Per Abrahamsen, coded by Kyle | 1945 ;; New function with 20.1, suggested by Per Abrahamsen, coded by Kyle |
1926 ;; Jones and Hrvoje Niksic. | 1946 ;; Jones and Hrvoje Niksic. |
1927 (defun set-face-stipple (face pixmap &optional frame) | 1947 (defun set-face-stipple (face pixmap &optional frame) |
1928 "Change the stipple pixmap of FACE to PIXMAP. | 1948 "Change the stipple pixmap of FACE to PIXMAP. |