Mercurial > hg > xemacs-beta
comparison src/lread.c @ 249:83b3d10dcba9 r20-5b23
Import from CVS: tag r20-5b23
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:19:09 +0200 |
parents | 51092a27c943 |
children | 677f6a0ee643 |
comparison
equal
deleted
inserted
replaced
248:ad40ac2754d8 | 249:83b3d10dcba9 |
---|---|
564 Lisp_Object handler = Qnil; | 564 Lisp_Object handler = Qnil; |
565 Lisp_Object found = Qnil; | 565 Lisp_Object found = Qnil; |
566 struct gcpro gcpro1, gcpro2, gcpro3; | 566 struct gcpro gcpro1, gcpro2, gcpro3; |
567 int reading_elc = 0; | 567 int reading_elc = 0; |
568 int message_p = NILP (nomessage); | 568 int message_p = NILP (nomessage); |
569 #ifdef DEBUG_XEMACS | 569 /*#ifdef DEBUG_XEMACS*/ |
570 static Lisp_Object last_file_loaded; | 570 static Lisp_Object last_file_loaded; |
571 int pure_usage = 0; | 571 int pure_usage = 0; |
572 #endif | 572 /*#endif*/ |
573 #ifdef DOS_NT | 573 #ifdef DOS_NT |
574 int dosmode = O_TEXT; | 574 int dosmode = O_TEXT; |
575 #endif /* DOS_NT */ | 575 #endif /* DOS_NT */ |
576 struct stat s1, s2; | 576 struct stat s1, s2; |
577 GCPRO3 (file, newer, found); | 577 GCPRO3 (file, newer, found); |
578 | 578 |
579 CHECK_STRING (file); | 579 CHECK_STRING (file); |
580 | 580 |
581 #ifdef DEBUG_XEMACS | 581 /*#ifdef DEBUG_XEMACS*/ |
582 if (purify_flag && noninteractive) | 582 if (purify_flag && noninteractive) |
583 { | 583 { |
584 message_p = 1; | 584 message_p = 1; |
585 last_file_loaded = file; | 585 last_file_loaded = file; |
586 pure_usage = purespace_usage (); | 586 pure_usage = purespace_usage (); |
587 } | 587 } |
588 #endif /* DEBUG_XEMACS */ | 588 /*#endif /* DEBUG_XEMACS */ |
589 | 589 |
590 /* If file name is magic, call the handler. */ | 590 /* If file name is magic, call the handler. */ |
591 handler = Ffind_file_name_handler (file, Qload); | 591 handler = Ffind_file_name_handler (file, Qload); |
592 if (!NILP (handler)) | 592 if (!NILP (handler)) |
593 RETURN_UNGCPRO (call5 (handler, Qload, file, no_error, | 593 RETURN_UNGCPRO (call5 (handler, Qload, file, no_error, |
797 { | 797 { |
798 Lisp_Object tem; | 798 Lisp_Object tem; |
799 /* #### Disgusting kludge */ | 799 /* #### Disgusting kludge */ |
800 /* Run any load-hooks for this file. */ | 800 /* Run any load-hooks for this file. */ |
801 /* #### An even more disgusting kludge. There is horrible code */ | 801 /* #### An even more disgusting kludge. There is horrible code */ |
802 /* this is relying on the fact that dumped lisp files are found */ | 802 /* that is relying on the fact that dumped lisp files are found */ |
803 /* via `load-path' search. */ | 803 /* via `load-path' search. */ |
804 Lisp_Object name = file; | 804 Lisp_Object name = file; |
805 | 805 |
806 if (!NILP(Ffile_name_absolute_p(file))) | 806 if (!NILP(Ffile_name_absolute_p(file))) |
807 { | 807 { |
808 name = Ffile_name_nondirectory(file); | 808 name = Ffile_name_nondirectory(file); |
809 } | 809 } |
810 | 810 |
811 tem = Fassoc (name, Vafter_load_alist); | 811 { |
812 struct gcpro ngcpro1; | |
813 | |
814 NGCPRO1 (name); | |
815 tem = Fassoc (name, Vafter_load_alist); | |
816 NUNGCPRO; | |
817 } | |
812 if (!NILP (tem)) | 818 if (!NILP (tem)) |
813 { | 819 { |
814 struct gcpro ngcpro1; | 820 struct gcpro ngcpro1; |
815 | 821 |
816 NGCPRO1 (tem); | 822 NGCPRO1 (tem); |
819 Feval (tem); | 825 Feval (tem); |
820 NUNGCPRO; | 826 NUNGCPRO; |
821 } | 827 } |
822 } | 828 } |
823 | 829 |
824 #ifdef DEBUG_XEMACS | 830 /*#ifdef DEBUG_XEMACS*/ |
825 if (purify_flag && noninteractive) | 831 if (purify_flag && noninteractive) |
826 { | 832 { |
827 if (EQ (last_file_loaded, file)) | 833 if (EQ (last_file_loaded, file)) |
828 message_append (" (%d)", purespace_usage() - pure_usage); | 834 message_append (" (%d)", purespace_usage() - pure_usage); |
829 else | 835 else |
830 message ("Loading %s ...done (%d)", XSTRING_DATA (file), | 836 message ("Loading %s ...done (%d)", XSTRING_DATA (file), |
831 purespace_usage() - pure_usage); | 837 purespace_usage() - pure_usage); |
832 } | 838 } |
833 #endif /* DEBUG_XEMACS */ | 839 /*#endif /* DEBUG_XEMACS */ |
834 | 840 |
835 if (!noninteractive) | 841 if (!noninteractive) |
836 PRINT_LOADING_MESSAGE ("done"); | 842 PRINT_LOADING_MESSAGE ("done"); |
837 | 843 |
838 UNGCPRO; | 844 UNGCPRO; |