comparison src/eval.c @ 55879:7fd80a9c338d

(Fcondition_case): Fix usage. Simplify.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 01 Jun 2004 23:21:55 +0000
parents 97fe0ef6c077
children aec6fce52afb
comparison
equal deleted inserted replaced
55878:83ecae86dde6 55879:7fd80a9c338d
1218 with VAR bound to (SIGNALED-CONDITIONS . SIGNAL-DATA). 1218 with VAR bound to (SIGNALED-CONDITIONS . SIGNAL-DATA).
1219 VAR may be nil; then you do not get access to the signal information. 1219 VAR may be nil; then you do not get access to the signal information.
1220 1220
1221 The value of the last BODY form is returned from the condition-case. 1221 The value of the last BODY form is returned from the condition-case.
1222 See also the function `signal' for more info. 1222 See also the function `signal' for more info.
1223 usage: (condition-case VAR BODYFORM HANDLERS...) */) 1223 usage: (condition-case VAR BODYFORM &rest HANDLERS) */)
1224 (args) 1224 (args)
1225 Lisp_Object args; 1225 Lisp_Object args;
1226 { 1226 {
1227 Lisp_Object val; 1227 Lisp_Object val;
1228 struct catchtag c; 1228 struct catchtag c;
1233 var = Fcar (args); 1233 var = Fcar (args);
1234 bodyform = Fcar (Fcdr (args)); 1234 bodyform = Fcar (Fcdr (args));
1235 handlers = Fcdr (Fcdr (args)); 1235 handlers = Fcdr (Fcdr (args));
1236 CHECK_SYMBOL (var); 1236 CHECK_SYMBOL (var);
1237 1237
1238 for (val = handlers; ! NILP (val); val = Fcdr (val)) 1238 for (val = handlers; CONSP (val); val = XCDR (val))
1239 { 1239 {
1240 Lisp_Object tem; 1240 Lisp_Object tem;
1241 tem = Fcar (val); 1241 tem = XCAR (val);
1242 if (! (NILP (tem) 1242 if (! (NILP (tem)
1243 || (CONSP (tem) 1243 || (CONSP (tem)
1244 && (SYMBOLP (XCAR (tem)) 1244 && (SYMBOLP (XCAR (tem))
1245 || CONSP (XCAR (tem)))))) 1245 || CONSP (XCAR (tem))))))
1246 error ("Invalid condition handler", tem); 1246 error ("Invalid condition handler", tem);