Mercurial > hg > xemacs-beta
comparison src/gutter.c @ 438:84b14dcb0985 r21-2-27
Import from CVS: tag r21-2-27
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:32:25 +0200 |
parents | 3ecd8885ac67 |
children | 8de8e3f6228a |
comparison
equal
deleted
inserted
replaced
437:e2a4e8b94b82 | 438:84b14dcb0985 |
---|---|
803 Vdefault_gutter = Fmake_specifier (Qgutter); | 803 Vdefault_gutter = Fmake_specifier (Qgutter); |
804 /* #### It would be even nicer if the specifier caching | 804 /* #### It would be even nicer if the specifier caching |
805 automatically knew about specifier fallbacks, so we didn't | 805 automatically knew about specifier fallbacks, so we didn't |
806 have to do it ourselves. */ | 806 have to do it ourselves. */ |
807 set_specifier_caching (Vdefault_gutter, | 807 set_specifier_caching (Vdefault_gutter, |
808 slot_offset (struct window, | 808 offsetof (struct window, default_gutter), |
809 default_gutter), | |
810 default_gutter_specs_changed, | 809 default_gutter_specs_changed, |
811 0, 0); | 810 0, 0); |
812 | 811 |
813 DEFVAR_SPECIFIER ("top-gutter", | 812 DEFVAR_SPECIFIER ("top-gutter", |
814 &Vgutter[TOP_GUTTER] /* | 813 &Vgutter[TOP_GUTTER] /* |
816 Use `set-specifier' to change this. | 815 Use `set-specifier' to change this. |
817 See `default-gutter' for a description of a valid gutter instantiator. | 816 See `default-gutter' for a description of a valid gutter instantiator. |
818 */ ); | 817 */ ); |
819 Vgutter[TOP_GUTTER] = Fmake_specifier (Qgutter); | 818 Vgutter[TOP_GUTTER] = Fmake_specifier (Qgutter); |
820 set_specifier_caching (Vgutter[TOP_GUTTER], | 819 set_specifier_caching (Vgutter[TOP_GUTTER], |
821 slot_offset (struct window, | 820 offsetof (struct window, gutter[TOP_GUTTER]), |
822 gutter[TOP_GUTTER]), | |
823 gutter_specs_changed, | 821 gutter_specs_changed, |
824 0, 0); | 822 0, 0); |
825 | 823 |
826 DEFVAR_SPECIFIER ("bottom-gutter", | 824 DEFVAR_SPECIFIER ("bottom-gutter", |
827 &Vgutter[BOTTOM_GUTTER] /* | 825 &Vgutter[BOTTOM_GUTTER] /* |
834 `bottom-gutter-height') is 0; thus, a bottom gutter will not be | 832 `bottom-gutter-height') is 0; thus, a bottom gutter will not be |
835 displayed even if you provide a value for `bottom-gutter'. | 833 displayed even if you provide a value for `bottom-gutter'. |
836 */ ); | 834 */ ); |
837 Vgutter[BOTTOM_GUTTER] = Fmake_specifier (Qgutter); | 835 Vgutter[BOTTOM_GUTTER] = Fmake_specifier (Qgutter); |
838 set_specifier_caching (Vgutter[BOTTOM_GUTTER], | 836 set_specifier_caching (Vgutter[BOTTOM_GUTTER], |
839 slot_offset (struct window, | 837 offsetof (struct window, gutter[BOTTOM_GUTTER]), |
840 gutter[BOTTOM_GUTTER]), | |
841 gutter_specs_changed, | 838 gutter_specs_changed, |
842 0, 0); | 839 0, 0); |
843 | 840 |
844 DEFVAR_SPECIFIER ("left-gutter", | 841 DEFVAR_SPECIFIER ("left-gutter", |
845 &Vgutter[LEFT_GUTTER] /* | 842 &Vgutter[LEFT_GUTTER] /* |
852 `left-gutter-width') is 0; thus, a left gutter will not be | 849 `left-gutter-width') is 0; thus, a left gutter will not be |
853 displayed even if you provide a value for `left-gutter'. | 850 displayed even if you provide a value for `left-gutter'. |
854 */ ); | 851 */ ); |
855 Vgutter[LEFT_GUTTER] = Fmake_specifier (Qgutter); | 852 Vgutter[LEFT_GUTTER] = Fmake_specifier (Qgutter); |
856 set_specifier_caching (Vgutter[LEFT_GUTTER], | 853 set_specifier_caching (Vgutter[LEFT_GUTTER], |
857 slot_offset (struct window, | 854 offsetof (struct window, gutter[LEFT_GUTTER]), |
858 gutter[LEFT_GUTTER]), | |
859 gutter_specs_changed, | 855 gutter_specs_changed, |
860 0, 0); | 856 0, 0); |
861 | 857 |
862 DEFVAR_SPECIFIER ("right-gutter", | 858 DEFVAR_SPECIFIER ("right-gutter", |
863 &Vgutter[RIGHT_GUTTER] /* | 859 &Vgutter[RIGHT_GUTTER] /* |
870 `right-gutter-width') is 0; thus, a right gutter will not be | 866 `right-gutter-width') is 0; thus, a right gutter will not be |
871 displayed even if you provide a value for `right-gutter'. | 867 displayed even if you provide a value for `right-gutter'. |
872 */ ); | 868 */ ); |
873 Vgutter[RIGHT_GUTTER] = Fmake_specifier (Qgutter); | 869 Vgutter[RIGHT_GUTTER] = Fmake_specifier (Qgutter); |
874 set_specifier_caching (Vgutter[RIGHT_GUTTER], | 870 set_specifier_caching (Vgutter[RIGHT_GUTTER], |
875 slot_offset (struct window, | 871 offsetof (struct window, gutter[RIGHT_GUTTER]), |
876 gutter[RIGHT_GUTTER]), | |
877 gutter_specs_changed, | 872 gutter_specs_changed, |
878 0, 0); | 873 0, 0); |
879 | 874 |
880 /* initially, top inherits from default; this can be | 875 /* initially, top inherits from default; this can be |
881 changed with `set-default-gutter-position'. */ | 876 changed with `set-default-gutter-position'. */ |
911 calculated to be large enough to hold the contents of the gutter. This | 906 calculated to be large enough to hold the contents of the gutter. This |
912 is the default. | 907 is the default. |
913 */ ); | 908 */ ); |
914 Vdefault_gutter_height = Fmake_specifier (Qgutter_size); | 909 Vdefault_gutter_height = Fmake_specifier (Qgutter_size); |
915 set_specifier_caching (Vdefault_gutter_height, | 910 set_specifier_caching (Vdefault_gutter_height, |
916 slot_offset (struct window, | 911 offsetof (struct window, default_gutter_height), |
917 default_gutter_height), | |
918 default_gutter_size_changed_in_window, | 912 default_gutter_size_changed_in_window, |
919 0, 0); | 913 0, 0); |
920 | 914 |
921 DEFVAR_SPECIFIER ("default-gutter-width", &Vdefault_gutter_width /* | 915 DEFVAR_SPECIFIER ("default-gutter-width", &Vdefault_gutter_width /* |
922 *Width of the default gutter, if it's oriented vertically. | 916 *Width of the default gutter, if it's oriented vertically. |
924 | 918 |
925 See `default-gutter-height' for more information. | 919 See `default-gutter-height' for more information. |
926 */ ); | 920 */ ); |
927 Vdefault_gutter_width = Fmake_specifier (Qnatnum); | 921 Vdefault_gutter_width = Fmake_specifier (Qnatnum); |
928 set_specifier_caching (Vdefault_gutter_width, | 922 set_specifier_caching (Vdefault_gutter_width, |
929 slot_offset (struct window, | 923 offsetof (struct window, default_gutter_width), |
930 default_gutter_width), | |
931 default_gutter_size_changed_in_window, | 924 default_gutter_size_changed_in_window, |
932 0, 0); | 925 0, 0); |
933 | 926 |
934 DEFVAR_SPECIFIER ("top-gutter-height", | 927 DEFVAR_SPECIFIER ("top-gutter-height", |
935 &Vgutter_size[TOP_GUTTER] /* | 928 &Vgutter_size[TOP_GUTTER] /* |
938 | 931 |
939 See `default-gutter-height' for more information. | 932 See `default-gutter-height' for more information. |
940 */ ); | 933 */ ); |
941 Vgutter_size[TOP_GUTTER] = Fmake_specifier (Qgutter_size); | 934 Vgutter_size[TOP_GUTTER] = Fmake_specifier (Qgutter_size); |
942 set_specifier_caching (Vgutter_size[TOP_GUTTER], | 935 set_specifier_caching (Vgutter_size[TOP_GUTTER], |
943 slot_offset (struct window, | 936 offsetof (struct window, gutter_size[TOP_GUTTER]), |
944 gutter_size[TOP_GUTTER]), | |
945 gutter_geometry_changed_in_window, | 937 gutter_geometry_changed_in_window, |
946 0, 0); | 938 0, 0); |
947 | 939 |
948 DEFVAR_SPECIFIER ("bottom-gutter-height", | 940 DEFVAR_SPECIFIER ("bottom-gutter-height", |
949 &Vgutter_size[BOTTOM_GUTTER] /* | 941 &Vgutter_size[BOTTOM_GUTTER] /* |
952 | 944 |
953 See `default-gutter-height' for more information. | 945 See `default-gutter-height' for more information. |
954 */ ); | 946 */ ); |
955 Vgutter_size[BOTTOM_GUTTER] = Fmake_specifier (Qgutter_size); | 947 Vgutter_size[BOTTOM_GUTTER] = Fmake_specifier (Qgutter_size); |
956 set_specifier_caching (Vgutter_size[BOTTOM_GUTTER], | 948 set_specifier_caching (Vgutter_size[BOTTOM_GUTTER], |
957 slot_offset (struct window, | 949 offsetof (struct window, gutter_size[BOTTOM_GUTTER]), |
958 gutter_size[BOTTOM_GUTTER]), | |
959 gutter_geometry_changed_in_window, | 950 gutter_geometry_changed_in_window, |
960 0, 0); | 951 0, 0); |
961 | 952 |
962 DEFVAR_SPECIFIER ("left-gutter-width", | 953 DEFVAR_SPECIFIER ("left-gutter-width", |
963 &Vgutter_size[LEFT_GUTTER] /* | 954 &Vgutter_size[LEFT_GUTTER] /* |
966 | 957 |
967 See `default-gutter-height' for more information. | 958 See `default-gutter-height' for more information. |
968 */ ); | 959 */ ); |
969 Vgutter_size[LEFT_GUTTER] = Fmake_specifier (Qnatnum); | 960 Vgutter_size[LEFT_GUTTER] = Fmake_specifier (Qnatnum); |
970 set_specifier_caching (Vgutter_size[LEFT_GUTTER], | 961 set_specifier_caching (Vgutter_size[LEFT_GUTTER], |
971 slot_offset (struct window, | 962 offsetof (struct window, gutter_size[LEFT_GUTTER]), |
972 gutter_size[LEFT_GUTTER]), | |
973 gutter_geometry_changed_in_window, | 963 gutter_geometry_changed_in_window, |
974 0, 0); | 964 0, 0); |
975 | 965 |
976 DEFVAR_SPECIFIER ("right-gutter-width", | 966 DEFVAR_SPECIFIER ("right-gutter-width", |
977 &Vgutter_size[RIGHT_GUTTER] /* | 967 &Vgutter_size[RIGHT_GUTTER] /* |
980 | 970 |
981 See `default-gutter-height' for more information. | 971 See `default-gutter-height' for more information. |
982 */ ); | 972 */ ); |
983 Vgutter_size[RIGHT_GUTTER] = Fmake_specifier (Qnatnum); | 973 Vgutter_size[RIGHT_GUTTER] = Fmake_specifier (Qnatnum); |
984 set_specifier_caching (Vgutter_size[RIGHT_GUTTER], | 974 set_specifier_caching (Vgutter_size[RIGHT_GUTTER], |
985 slot_offset (struct window, | 975 offsetof (struct window, gutter_size[RIGHT_GUTTER]), |
986 gutter_size[RIGHT_GUTTER]), | |
987 gutter_geometry_changed_in_window, | 976 gutter_geometry_changed_in_window, |
988 0, 0); | 977 0, 0); |
989 | 978 |
990 fb = Qnil; | 979 fb = Qnil; |
991 #ifdef HAVE_TTY | 980 #ifdef HAVE_TTY |
1034 instead. | 1023 instead. |
1035 | 1024 |
1036 */ ); | 1025 */ ); |
1037 Vdefault_gutter_border_width = Fmake_specifier (Qnatnum); | 1026 Vdefault_gutter_border_width = Fmake_specifier (Qnatnum); |
1038 set_specifier_caching (Vdefault_gutter_border_width, | 1027 set_specifier_caching (Vdefault_gutter_border_width, |
1039 slot_offset (struct window, | 1028 offsetof (struct window, default_gutter_border_width), |
1040 default_gutter_border_width), | |
1041 default_gutter_border_width_changed_in_window, | 1029 default_gutter_border_width_changed_in_window, |
1042 0, 0); | 1030 0, 0); |
1043 | 1031 |
1044 DEFVAR_SPECIFIER ("top-gutter-border-width", | 1032 DEFVAR_SPECIFIER ("top-gutter-border-width", |
1045 &Vgutter_border_width[TOP_GUTTER] /* | 1033 &Vgutter_border_width[TOP_GUTTER] /* |
1048 | 1036 |
1049 See `default-gutter-height' for more information. | 1037 See `default-gutter-height' for more information. |
1050 */ ); | 1038 */ ); |
1051 Vgutter_border_width[TOP_GUTTER] = Fmake_specifier (Qnatnum); | 1039 Vgutter_border_width[TOP_GUTTER] = Fmake_specifier (Qnatnum); |
1052 set_specifier_caching (Vgutter_border_width[TOP_GUTTER], | 1040 set_specifier_caching (Vgutter_border_width[TOP_GUTTER], |
1053 slot_offset (struct window, | 1041 offsetof (struct window, |
1054 gutter_border_width[TOP_GUTTER]), | 1042 gutter_border_width[TOP_GUTTER]), |
1055 gutter_geometry_changed_in_window, | 1043 gutter_geometry_changed_in_window, |
1056 0, 0); | 1044 0, 0); |
1057 | 1045 |
1058 DEFVAR_SPECIFIER ("bottom-gutter-border-width", | 1046 DEFVAR_SPECIFIER ("bottom-gutter-border-width", |
1059 &Vgutter_border_width[BOTTOM_GUTTER] /* | 1047 &Vgutter_border_width[BOTTOM_GUTTER] /* |
1062 | 1050 |
1063 See `default-gutter-height' for more information. | 1051 See `default-gutter-height' for more information. |
1064 */ ); | 1052 */ ); |
1065 Vgutter_border_width[BOTTOM_GUTTER] = Fmake_specifier (Qnatnum); | 1053 Vgutter_border_width[BOTTOM_GUTTER] = Fmake_specifier (Qnatnum); |
1066 set_specifier_caching (Vgutter_border_width[BOTTOM_GUTTER], | 1054 set_specifier_caching (Vgutter_border_width[BOTTOM_GUTTER], |
1067 slot_offset (struct window, | 1055 offsetof (struct window, |
1068 gutter_border_width[BOTTOM_GUTTER]), | 1056 gutter_border_width[BOTTOM_GUTTER]), |
1069 gutter_geometry_changed_in_window, | 1057 gutter_geometry_changed_in_window, |
1070 0, 0); | 1058 0, 0); |
1071 | 1059 |
1072 DEFVAR_SPECIFIER ("left-gutter-border-width", | 1060 DEFVAR_SPECIFIER ("left-gutter-border-width", |
1073 &Vgutter_border_width[LEFT_GUTTER] /* | 1061 &Vgutter_border_width[LEFT_GUTTER] /* |
1076 | 1064 |
1077 See `default-gutter-height' for more information. | 1065 See `default-gutter-height' for more information. |
1078 */ ); | 1066 */ ); |
1079 Vgutter_border_width[LEFT_GUTTER] = Fmake_specifier (Qnatnum); | 1067 Vgutter_border_width[LEFT_GUTTER] = Fmake_specifier (Qnatnum); |
1080 set_specifier_caching (Vgutter_border_width[LEFT_GUTTER], | 1068 set_specifier_caching (Vgutter_border_width[LEFT_GUTTER], |
1081 slot_offset (struct window, | 1069 offsetof (struct window, |
1082 gutter_border_width[LEFT_GUTTER]), | 1070 gutter_border_width[LEFT_GUTTER]), |
1083 gutter_geometry_changed_in_window, | 1071 gutter_geometry_changed_in_window, |
1084 0, 0); | 1072 0, 0); |
1085 | 1073 |
1086 DEFVAR_SPECIFIER ("right-gutter-border-width", | 1074 DEFVAR_SPECIFIER ("right-gutter-border-width", |
1087 &Vgutter_border_width[RIGHT_GUTTER] /* | 1075 &Vgutter_border_width[RIGHT_GUTTER] /* |
1090 | 1078 |
1091 See `default-gutter-height' for more information. | 1079 See `default-gutter-height' for more information. |
1092 */ ); | 1080 */ ); |
1093 Vgutter_border_width[RIGHT_GUTTER] = Fmake_specifier (Qnatnum); | 1081 Vgutter_border_width[RIGHT_GUTTER] = Fmake_specifier (Qnatnum); |
1094 set_specifier_caching (Vgutter_border_width[RIGHT_GUTTER], | 1082 set_specifier_caching (Vgutter_border_width[RIGHT_GUTTER], |
1095 slot_offset (struct window, | 1083 offsetof (struct window, |
1096 gutter_border_width[RIGHT_GUTTER]), | 1084 gutter_border_width[RIGHT_GUTTER]), |
1097 gutter_geometry_changed_in_window, | 1085 gutter_geometry_changed_in_window, |
1098 0, 0); | 1086 0, 0); |
1099 | 1087 |
1100 fb = Qnil; | 1088 fb = Qnil; |
1101 #ifdef HAVE_TTY | 1089 #ifdef HAVE_TTY |
1131 `default-gutter-visible-p' and all of the position-specific gutter | 1119 `default-gutter-visible-p' and all of the position-specific gutter |
1132 visibility specifiers have a fallback value of true. | 1120 visibility specifiers have a fallback value of true. |
1133 */ ); | 1121 */ ); |
1134 Vdefault_gutter_visible_p = Fmake_specifier (Qboolean); | 1122 Vdefault_gutter_visible_p = Fmake_specifier (Qboolean); |
1135 set_specifier_caching (Vdefault_gutter_visible_p, | 1123 set_specifier_caching (Vdefault_gutter_visible_p, |
1136 slot_offset (struct window, | 1124 offsetof (struct window, |
1137 default_gutter_visible_p), | 1125 default_gutter_visible_p), |
1138 default_gutter_visible_p_changed_in_window, | 1126 default_gutter_visible_p_changed_in_window, |
1139 0, 0); | 1127 0, 0); |
1140 | 1128 |
1141 DEFVAR_SPECIFIER ("top-gutter-visible-p", | 1129 DEFVAR_SPECIFIER ("top-gutter-visible-p", |
1142 &Vgutter_visible_p[TOP_GUTTER] /* | 1130 &Vgutter_visible_p[TOP_GUTTER] /* |
1145 | 1133 |
1146 See `default-gutter-visible-p' for more information. | 1134 See `default-gutter-visible-p' for more information. |
1147 */ ); | 1135 */ ); |
1148 Vgutter_visible_p[TOP_GUTTER] = Fmake_specifier (Qboolean); | 1136 Vgutter_visible_p[TOP_GUTTER] = Fmake_specifier (Qboolean); |
1149 set_specifier_caching (Vgutter_visible_p[TOP_GUTTER], | 1137 set_specifier_caching (Vgutter_visible_p[TOP_GUTTER], |
1150 slot_offset (struct window, | 1138 offsetof (struct window, |
1151 gutter_visible_p[TOP_GUTTER]), | 1139 gutter_visible_p[TOP_GUTTER]), |
1152 gutter_geometry_changed_in_window, | 1140 gutter_geometry_changed_in_window, |
1153 0, 0); | 1141 0, 0); |
1154 | 1142 |
1155 DEFVAR_SPECIFIER ("bottom-gutter-visible-p", | 1143 DEFVAR_SPECIFIER ("bottom-gutter-visible-p", |
1156 &Vgutter_visible_p[BOTTOM_GUTTER] /* | 1144 &Vgutter_visible_p[BOTTOM_GUTTER] /* |
1159 | 1147 |
1160 See `default-gutter-visible-p' for more information. | 1148 See `default-gutter-visible-p' for more information. |
1161 */ ); | 1149 */ ); |
1162 Vgutter_visible_p[BOTTOM_GUTTER] = Fmake_specifier (Qboolean); | 1150 Vgutter_visible_p[BOTTOM_GUTTER] = Fmake_specifier (Qboolean); |
1163 set_specifier_caching (Vgutter_visible_p[BOTTOM_GUTTER], | 1151 set_specifier_caching (Vgutter_visible_p[BOTTOM_GUTTER], |
1164 slot_offset (struct window, | 1152 offsetof (struct window, |
1165 gutter_visible_p[BOTTOM_GUTTER]), | 1153 gutter_visible_p[BOTTOM_GUTTER]), |
1166 gutter_geometry_changed_in_window, | 1154 gutter_geometry_changed_in_window, |
1167 0, 0); | 1155 0, 0); |
1168 | 1156 |
1169 DEFVAR_SPECIFIER ("left-gutter-visible-p", | 1157 DEFVAR_SPECIFIER ("left-gutter-visible-p", |
1170 &Vgutter_visible_p[LEFT_GUTTER] /* | 1158 &Vgutter_visible_p[LEFT_GUTTER] /* |
1173 | 1161 |
1174 See `default-gutter-visible-p' for more information. | 1162 See `default-gutter-visible-p' for more information. |
1175 */ ); | 1163 */ ); |
1176 Vgutter_visible_p[LEFT_GUTTER] = Fmake_specifier (Qboolean); | 1164 Vgutter_visible_p[LEFT_GUTTER] = Fmake_specifier (Qboolean); |
1177 set_specifier_caching (Vgutter_visible_p[LEFT_GUTTER], | 1165 set_specifier_caching (Vgutter_visible_p[LEFT_GUTTER], |
1178 slot_offset (struct window, | 1166 offsetof (struct window, |
1179 gutter_visible_p[LEFT_GUTTER]), | 1167 gutter_visible_p[LEFT_GUTTER]), |
1180 gutter_geometry_changed_in_window, | 1168 gutter_geometry_changed_in_window, |
1181 0, 0); | 1169 0, 0); |
1182 | 1170 |
1183 DEFVAR_SPECIFIER ("right-gutter-visible-p", | 1171 DEFVAR_SPECIFIER ("right-gutter-visible-p", |
1184 &Vgutter_visible_p[RIGHT_GUTTER] /* | 1172 &Vgutter_visible_p[RIGHT_GUTTER] /* |
1187 | 1175 |
1188 See `default-gutter-visible-p' for more information. | 1176 See `default-gutter-visible-p' for more information. |
1189 */ ); | 1177 */ ); |
1190 Vgutter_visible_p[RIGHT_GUTTER] = Fmake_specifier (Qboolean); | 1178 Vgutter_visible_p[RIGHT_GUTTER] = Fmake_specifier (Qboolean); |
1191 set_specifier_caching (Vgutter_visible_p[RIGHT_GUTTER], | 1179 set_specifier_caching (Vgutter_visible_p[RIGHT_GUTTER], |
1192 slot_offset (struct window, | 1180 offsetof (struct window, |
1193 gutter_visible_p[RIGHT_GUTTER]), | 1181 gutter_visible_p[RIGHT_GUTTER]), |
1194 gutter_geometry_changed_in_window, | 1182 gutter_geometry_changed_in_window, |
1195 0, 0); | 1183 0, 0); |
1196 | 1184 |
1197 /* initially, top inherits from default; this can be | 1185 /* initially, top inherits from default; this can be |
1198 changed with `set-default-gutter-position'. */ | 1186 changed with `set-default-gutter-position'. */ |