comparison src/lread.c @ 40211:19a89ce104dd

(syms_of_lread)<recursive-load-depth-limit>: Raise to 50.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 23 Oct 2001 14:08:08 +0000
parents 579177964efa
children 8f64b39c2a12
comparison
equal deleted inserted replaced
40210:01666fd1b210 40211:19a89ce104dd
830 message_with_string ("Loading %s...", file, 1); 830 message_with_string ("Loading %s...", file, 1);
831 } 831 }
832 832
833 GCPRO1 (file); 833 GCPRO1 (file);
834 lispstream = Fcons (Qnil, Qnil); 834 lispstream = Fcons (Qnil, Qnil);
835 XSETCARFASTINT (lispstream, (EMACS_UINT)stream >> 16); 835 XSETFASTINT (XCAR (lispstream), (EMACS_UINT)stream >> 16);
836 XSETCDRFASTINT (lispstream, (EMACS_UINT)stream & 0xffff); 836 XSETFASTINT (XCDR (lispstream), (EMACS_UINT)stream & 0xffff);
837 record_unwind_protect (load_unwind, lispstream); 837 record_unwind_protect (load_unwind, lispstream);
838 record_unwind_protect (load_descriptor_unwind, load_descriptor_list); 838 record_unwind_protect (load_descriptor_unwind, load_descriptor_list);
839 specbind (Qload_file_name, found); 839 specbind (Qload_file_name, found);
840 specbind (Qinhibit_file_name_operation, Qnil); 840 specbind (Qinhibit_file_name_operation, Qnil);
841 load_descriptor_list 841 load_descriptor_list
961 struct stat st; 961 struct stat st;
962 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; 962 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
963 Lisp_Object string, tail; 963 Lisp_Object string, tail;
964 int max_suffix_len = 0; 964 int max_suffix_len = 0;
965 965
966 for (tail = suffixes; CONSP (tail); tail = XCDR (tail))
967 {
968 CHECK_STRING (XCAR (tail), 0);
969 max_suffix_len = max (max_suffix_len,
970 STRING_BYTES (XSTRING (XCAR (tail))));
971 }
972
966 string = filename = Qnil; 973 string = filename = Qnil;
967 GCPRO5 (str, string, filename, path, suffixes); 974 GCPRO5 (str, string, filename, path, suffixes);
968 975
969 for (tail = suffixes; CONSP (tail); tail = XCDR (tail))
970 {
971 string = XCAR (tail);
972 CHECK_STRING (string, 0);
973 if (! EQ (string, XCAR (tail)))
974 XSETCAR (tail, string);
975 max_suffix_len = max (max_suffix_len,
976 STRING_BYTES (XSTRING (string)));
977 }
978
979 if (storeptr) 976 if (storeptr)
980 *storeptr = Qnil; 977 *storeptr = Qnil;
981 978
982 if (complete_filename_p (str)) 979 if (complete_filename_p (str))
983 absolute = 1; 980 absolute = 1;
2725 return val; 2722 return val;
2726 if (ch == '.') 2723 if (ch == '.')
2727 { 2724 {
2728 GCPRO2 (val, tail); 2725 GCPRO2 (val, tail);
2729 if (!NILP (tail)) 2726 if (!NILP (tail))
2730 XSETCDR (tail, read0 (readcharfun)); 2727 XCDR (tail) = read0 (readcharfun);
2731 else 2728 else
2732 val = read0 (readcharfun); 2729 val = read0 (readcharfun);
2733 read1 (readcharfun, &ch, 0); 2730 read1 (readcharfun, &ch, 0);
2734 UNGCPRO; 2731 UNGCPRO;
2735 if (ch == ')') 2732 if (ch == ')')
2818 } 2815 }
2819 tem = (read_pure && flag <= 0 2816 tem = (read_pure && flag <= 0
2820 ? pure_cons (elt, Qnil) 2817 ? pure_cons (elt, Qnil)
2821 : Fcons (elt, Qnil)); 2818 : Fcons (elt, Qnil));
2822 if (!NILP (tail)) 2819 if (!NILP (tail))
2823 XSETCDR (tail, tem); 2820 XCDR (tail) = tem;
2824 else 2821 else
2825 val = tem; 2822 val = tem;
2826 tail = tem; 2823 tail = tem;
2827 if (defunflag < 0) 2824 if (defunflag < 0)
2828 defunflag = EQ (elt, Qdefun); 2825 defunflag = EQ (elt, Qdefun);
3654 3651
3655 DEFVAR_LISP ("recursive-load-depth-limit", &Vrecursive_load_depth_limit, 3652 DEFVAR_LISP ("recursive-load-depth-limit", &Vrecursive_load_depth_limit,
3656 "Limit for depth of recursive loads.\n\ 3653 "Limit for depth of recursive loads.\n\
3657 Value should be either an integer > 0 specifying the limit, or nil for\n\ 3654 Value should be either an integer > 0 specifying the limit, or nil for\n\
3658 no limit."); 3655 no limit.");
3659 Vrecursive_load_depth_limit = make_number (10); 3656 Vrecursive_load_depth_limit = make_number (50);
3660 3657
3661 /* Vsource_directory was initialized in init_lread. */ 3658 /* Vsource_directory was initialized in init_lread. */
3662 3659
3663 load_descriptor_list = Qnil; 3660 load_descriptor_list = Qnil;
3664 staticpro (&load_descriptor_list); 3661 staticpro (&load_descriptor_list);