# HG changeset patch # User Gerd Moellmann # Date 1002791031 0 # Node ID 00f499d0cd166ff78f6b32e84e9b4fa2da180688 # Parent 2a0aa5b942d7fa7930db7b2b9024b9859d368871 (Qcircular_list): New variable. (circular_list_error): New function. (syms_of_data): Initialize it Qcircular_list. diff -r 2a0aa5b942d7 -r 00f499d0cd16 src/data.c --- a/src/data.c Thu Oct 11 08:46:50 2001 +0000 +++ b/src/data.c Thu Oct 11 09:03:51 2001 +0000 @@ -65,7 +65,7 @@ Lisp_Object Qerror_conditions, Qerror_message, Qtop_level; Lisp_Object Qerror, Qquit, Qwrong_type_argument, Qargs_out_of_range; Lisp_Object Qvoid_variable, Qvoid_function, Qcyclic_function_indirection; -Lisp_Object Qcyclic_variable_indirection; +Lisp_Object Qcyclic_variable_indirection, Qcircular_list; Lisp_Object Qsetting_constant, Qinvalid_read_syntax; Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch; Lisp_Object Qend_of_file, Qarith_error, Qmark_inactive; @@ -98,6 +98,15 @@ int most_positive_fixnum, most_negative_fixnum; + +void +circular_list_error (list) + Lisp_Object list; +{ + Fsignal (Qcircular_list, list); +} + + Lisp_Object wrong_type_argument (predicate, value) register Lisp_Object predicate, value; @@ -2881,6 +2890,13 @@ Fput (Qcyclic_variable_indirection, Qerror_message, build_string ("Symbol's chain of variable indirections contains a loop")); + Qcircular_list = intern ("circular-list"); + staticpro (&Qcircular_list); + Fput (Qcircular_list, Qerror_conditions, + Fcons (Qcircular_list, error_tail)); + Fput (Qcircular_list, Qerror_message, + build_string ("List contains a loop")); + Fput (Qvoid_variable, Qerror_conditions, Fcons (Qvoid_variable, error_tail)); Fput (Qvoid_variable, Qerror_message,