Mercurial > emacs
comparison src/xmenu.c @ 5809:1493700a3d78
(single_keymap_panes): Use internal_condition_case_1.
(single_keymap_panes_1): New function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 07 Feb 1994 01:05:06 +0000 |
parents | 07a36e38e514 |
children | 8dc616f310e8 |
comparison
equal
deleted
inserted
replaced
5808:995860e5f342 | 5809:1493700a3d78 |
---|---|
1147 | 1147 |
1148 /* Return the number of panes. */ | 1148 /* Return the number of panes. */ |
1149 return p; | 1149 return p; |
1150 } | 1150 } |
1151 | 1151 |
1152 /* This is a recursive subroutine of the previous function. | 1152 /* This is used as the handler when calling internal_condition_case_1. */ |
1153 | |
1154 static Lisp_Object | |
1155 single_keymap_panes_1 (arg) | |
1156 Lisp_Object arg; | |
1157 { | |
1158 return Qnil; | |
1159 } | |
1160 | |
1161 /* This is a recursive subroutine of keymap_panes. | |
1153 It handles one keymap, KEYMAP. | 1162 It handles one keymap, KEYMAP. |
1154 The other arguments are passed along | 1163 The other arguments are passed along |
1155 or point to local variables of the previous function. */ | 1164 or point to local variables of the previous function. */ |
1156 | 1165 |
1157 single_keymap_panes (keymap, panes, vector, names, enables, items, prefixes, | 1166 single_keymap_panes (keymap, panes, vector, names, enables, items, prefixes, |
1244 { | 1253 { |
1245 /* No property, or nil, means enable. | 1254 /* No property, or nil, means enable. |
1246 Otherwise, enable if value is not nil. */ | 1255 Otherwise, enable if value is not nil. */ |
1247 tem = Fget (def, Qmenu_enable); | 1256 tem = Fget (def, Qmenu_enable); |
1248 if (!NILP (tem)) | 1257 if (!NILP (tem)) |
1249 enabled = Feval (tem); | 1258 /* (condition-case nil (eval tem) |
1259 (error nil)) */ | |
1260 enabled = internal_condition_case_1 (Feval, tem, | |
1261 Qerror, | |
1262 single_keymap_panes_1); | |
1250 } | 1263 } |
1251 tem = Fkeymapp (def); | 1264 tem = Fkeymapp (def); |
1252 if (XSTRING (item2)->data[0] == '@' && !NILP (tem)) | 1265 if (XSTRING (item2)->data[0] == '@' && !NILP (tem)) |
1253 pending_maps = Fcons (Fcons (def, Fcons (item2, XCONS (item)->car)), | 1266 pending_maps = Fcons (Fcons (def, Fcons (item2, XCONS (item)->car)), |
1254 pending_maps); | 1267 pending_maps); |
1289 { | 1302 { |
1290 tem = Fget (def, Qmenu_enable); | 1303 tem = Fget (def, Qmenu_enable); |
1291 /* No property, or nil, means enable. | 1304 /* No property, or nil, means enable. |
1292 Otherwise, enable if value is not nil. */ | 1305 Otherwise, enable if value is not nil. */ |
1293 if (!NILP (tem)) | 1306 if (!NILP (tem)) |
1294 enabled = Feval (tem); | 1307 /* (condition-case nil (eval tem) |
1308 (error nil)) */ | |
1309 enabled = internal_condition_case_1 (Feval, tem, | |
1310 Qerror, | |
1311 single_keymap_panes_1); | |
1295 } | 1312 } |
1296 | 1313 |
1297 tem = Fkeymapp (def); | 1314 tem = Fkeymapp (def); |
1298 if (XSTRING (item2)->data[0] == '@' && !NILP (tem)) | 1315 if (XSTRING (item2)->data[0] == '@' && !NILP (tem)) |
1299 pending_maps = Fcons (Fcons (def, Fcons (item2, character)), | 1316 pending_maps = Fcons (Fcons (def, Fcons (item2, character)), |