Mercurial > hg > xemacs-beta
comparison src/faces.c @ 288:e11d67e05968 r21-0b42
Import from CVS: tag r21-0b42
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:35:54 +0200 |
parents | 558f606b08ae |
children | c9fe270a4101 |
comparison
equal
deleted
inserted
replaced
287:13a0bd77a29d | 288:e11d67e05968 |
---|---|
52 Lisp_Object Qinit_global_faces; | 52 Lisp_Object Qinit_global_faces; |
53 | 53 |
54 /* These faces are used directly internally. We use these variables | 54 /* These faces are used directly internally. We use these variables |
55 to be able to reference them directly and save the overhead of | 55 to be able to reference them directly and save the overhead of |
56 calling Ffind_face. */ | 56 calling Ffind_face. */ |
57 Lisp_Object Vdefault_face, Vmodeline_face; | 57 Lisp_Object Vdefault_face, Vmodeline_face, V3d_object_face; |
58 Lisp_Object Vleft_margin_face, Vright_margin_face, Vtext_cursor_face; | 58 Lisp_Object Vleft_margin_face, Vright_margin_face, Vtext_cursor_face; |
59 Lisp_Object Vpointer_face; | 59 Lisp_Object Vpointer_face; |
60 Lisp_Object Vvertical_divider_face; | 60 Lisp_Object Vvertical_divider_face; |
61 | 61 |
62 /* Qdefault, Qhighlight defined in general.c */ | 62 /* Qdefault, Qhighlight defined in general.c */ |
63 Lisp_Object Qmodeline, Qleft_margin, Qright_margin, Qtext_cursor; | 63 Lisp_Object Qmodeline, Q3d_object, Qleft_margin, Qright_margin, Qtext_cursor; |
64 Lisp_Object Qvertical_divider; | 64 Lisp_Object Qvertical_divider; |
65 | 65 |
66 /* In the old implementation Vface_list was a list of the face names, | 66 /* In the old implementation Vface_list was a list of the face names, |
67 not the faces themselves. We now distinguish between permanent and | 67 not the faces themselves. We now distinguish between permanent and |
68 temporary faces. Permanent faces are kept in a regular hash table, | 68 temporary faces. Permanent faces are kept in a regular hash table, |
1750 void | 1750 void |
1751 syms_of_faces (void) | 1751 syms_of_faces (void) |
1752 { | 1752 { |
1753 /* Qdefault defined in general.c */ | 1753 /* Qdefault defined in general.c */ |
1754 defsymbol (&Qmodeline, "modeline"); | 1754 defsymbol (&Qmodeline, "modeline"); |
1755 defsymbol (&Q3d_object, "3d-object"); | |
1755 defsymbol (&Qleft_margin, "left-margin"); | 1756 defsymbol (&Qleft_margin, "left-margin"); |
1756 defsymbol (&Qright_margin, "right-margin"); | 1757 defsymbol (&Qright_margin, "right-margin"); |
1757 defsymbol (&Qtext_cursor, "text-cursor"); | 1758 defsymbol (&Qtext_cursor, "text-cursor"); |
1758 defsymbol (&Qvertical_divider, "vertical-divider"); | 1759 defsymbol (&Qvertical_divider, "vertical-divider"); |
1759 | 1760 |
1802 staticpro (&Vtemporary_faces_cache); | 1803 staticpro (&Vtemporary_faces_cache); |
1803 Vtemporary_faces_cache = Qnil; | 1804 Vtemporary_faces_cache = Qnil; |
1804 | 1805 |
1805 staticpro (&Vdefault_face); | 1806 staticpro (&Vdefault_face); |
1806 Vdefault_face = Qnil; | 1807 Vdefault_face = Qnil; |
1808 staticpro (&V3d_object_face); | |
1809 V3d_object_face = Qnil; | |
1807 staticpro (&Vmodeline_face); | 1810 staticpro (&Vmodeline_face); |
1808 Vmodeline_face = Qnil; | 1811 Vmodeline_face = Qnil; |
1809 | 1812 |
1810 staticpro (&Vvertical_divider_face); | 1813 staticpro (&Vvertical_divider_face); |
1811 Vvertical_divider_face = Qnil; | 1814 Vvertical_divider_face = Qnil; |
1932 set_specifier_fallback (Fget (Vdefault_face, Qblinking, Qnil), | 1935 set_specifier_fallback (Fget (Vdefault_face, Qblinking, Qnil), |
1933 list1 (Fcons (Qnil, Qnil))); | 1936 list1 (Fcons (Qnil, Qnil))); |
1934 set_specifier_fallback (Fget (Vdefault_face, Qreverse, Qnil), | 1937 set_specifier_fallback (Fget (Vdefault_face, Qreverse, Qnil), |
1935 list1 (Fcons (Qnil, Qnil))); | 1938 list1 (Fcons (Qnil, Qnil))); |
1936 | 1939 |
1940 /* mustn't inherit bg pixmaps from the default face */ | |
1941 V3d_object_face = Fmake_face (Q3d_object, build_string ("3d object face"), | |
1942 Qnil); | |
1943 | |
1937 /* Now create the other faces that redisplay needs to refer to | 1944 /* Now create the other faces that redisplay needs to refer to |
1938 directly. We could create them in Lisp but it's simpler this | 1945 directly. We could create them in Lisp but it's simpler this |
1939 way since we need to get them anyway. */ | 1946 way since we need to get them anyway. */ |
1940 Vmodeline_face = Fmake_face (Qmodeline, build_string ("modeline face"), | 1947 Vmodeline_face = Fmake_face (Qmodeline, build_string ("modeline face"), |
1941 Qnil); | 1948 Qnil); |
1949 | |
1950 /* modeline-face should not inherit colors from the default face. */ | |
1951 set_specifier_fallback (Fget (Vmodeline_face, Qforeground, Qunbound), | |
1952 Fget (V3d_object_face, Qforeground, Qunbound)); | |
1953 set_specifier_fallback (Fget (Vmodeline_face, Qbackground, Qunbound), | |
1954 Fget (V3d_object_face, Qbackground, Qunbound)); | |
1955 set_specifier_fallback (Fget (Vmodeline_face, Qbackground_pixmap, | |
1956 Qnil), | |
1957 Fget (V3d_object_face, Qbackground_pixmap, Qunbound)); | |
1958 | |
1942 Vvertical_divider_face = Fmake_face (Qvertical_divider, | 1959 Vvertical_divider_face = Fmake_face (Qvertical_divider, |
1943 build_string ("vertical divider face"), | 1960 build_string ("vertical divider face"), |
1944 Qnil); | 1961 Qnil); |
1945 /* #### vertical-divider-face should not inherit from modeline face. | 1962 /* #### vertical-divider-face should not inherit from modeline face. |
1946 Perhaps there must be a 3d-object-face to supply default foreground, | 1963 Perhaps there must be a 3d-object-face to supply default foreground, |
1947 background and pixmap. */ | 1964 background and pixmap. */ |
1948 set_specifier_fallback (Fget (Vvertical_divider_face, Qforeground, Qunbound), | 1965 set_specifier_fallback (Fget (Vvertical_divider_face, Qforeground, Qunbound), |
1949 Fget (Vmodeline_face, Qforeground, Qunbound)); | 1966 Fget (V3d_object_face, Qforeground, Qunbound)); |
1950 set_specifier_fallback (Fget (Vvertical_divider_face, Qbackground, Qunbound), | 1967 set_specifier_fallback (Fget (Vvertical_divider_face, Qbackground, Qunbound), |
1951 Fget (Vmodeline_face, Qbackground, Qunbound)); | 1968 Fget (V3d_object_face, Qbackground, Qunbound)); |
1952 set_specifier_fallback (Fget (Vvertical_divider_face, Qbackground_pixmap, | 1969 set_specifier_fallback (Fget (Vvertical_divider_face, Qbackground_pixmap, |
1953 Qunbound), | 1970 Qunbound), |
1954 Fget (Vdefault_face, Qbackground_pixmap, Qunbound)); | 1971 Fget (V3d_object_face, Qbackground_pixmap, Qunbound)); |
1955 | 1972 |
1956 Vleft_margin_face = Fmake_face (Qleft_margin, | 1973 Vleft_margin_face = Fmake_face (Qleft_margin, |
1957 build_string ("left margin face"), | 1974 build_string ("left margin face"), |
1958 Qnil); | 1975 Qnil); |
1959 Vright_margin_face = Fmake_face (Qright_margin, | 1976 Vright_margin_face = Fmake_face (Qright_margin, |