emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src lread.c


From: Ken Raeburn
Subject: [Emacs-diffs] emacs/src lread.c
Date: Tue, 21 Jul 2009 09:26:31 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Ken Raeburn <raeburn>   09/07/21 09:26:31

Modified files:
        src            : lread.c 

Log message:
                (load_depth): New variable.
                (Fload, load_unwind, init_lread): Set it to the load recursion
                depth; set load_in_progress as a simple boolean based on the
                current load_depth.  (Bug#3892)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/lread.c?cvsroot=emacs&r1=1.406&r2=1.407

Patches:
Index: lread.c
===================================================================
RCS file: /sources/emacs/emacs/src/lread.c,v
retrieving revision 1.406
retrieving revision 1.407
diff -u -b -r1.406 -r1.407
--- lread.c     29 Apr 2009 03:03:00 -0000      1.406
+++ lread.c     21 Jul 2009 09:26:30 -0000      1.407
@@ -100,6 +100,9 @@
 /* non-zero if inside `load' */
 int load_in_progress;
 
+/* Depth of nested `load' invocations.  */
+int load_depth;
+
 /* Directory in which the sources were found.  */
 Lisp_Object Vsource_directory;
 
@@ -1250,7 +1253,8 @@
   specbind (Qinhibit_file_name_operation, Qnil);
   load_descriptor_list
     = Fcons (make_number (fileno (stream)), load_descriptor_list);
-  load_in_progress++;
+  load_depth++;
+  load_in_progress = 1;
   if (! version || version >= 22)
     readevalloop (Qget_file_char, stream, hist_file_name,
                  Feval, 0, Qnil, Qnil, Qnil, Qnil);
@@ -1312,7 +1316,8 @@
       fclose (stream);
       UNBLOCK_INPUT;
     }
-  if (--load_in_progress < 0) load_in_progress = 0;
+  if (--load_depth < 0) load_depth = 0;
+  load_in_progress = load_depth > 0;
   return Qnil;
 }
 
@@ -4129,6 +4134,7 @@
   Vvalues = Qnil;
 
   load_in_progress = 0;
+  load_depth = 0;
   Vload_file_name = Qnil;
 
   load_descriptor_list = Qnil;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]