emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/src ChangeLog lread.c


From: Ken Raeburn
Subject: [Emacs-diffs] emacs/src ChangeLog lread.c
Date: Sat, 25 Jul 2009 07:36:20 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Ken Raeburn <raeburn>   09/07/25 07:36:19

Modified files:
        src            : ChangeLog lread.c 

Log message:
        * lread.c: Rewrite 2009-07-21 changes.
        (load_depth): Deleted.
        (Qload_in_progress): New variable.
        (load_unwind): Don't reference load_depth or load_in_progress.
        (Fload): Likewise; specbind Qload_in_progress instead.
        (init_lread): Don't initialize load_depth.
        (syms_of_lread): Initialize and protect Qload_in_progress.

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

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7664
retrieving revision 1.7665
diff -u -b -r1.7664 -r1.7665
--- ChangeLog   24 Jul 2009 15:43:22 -0000      1.7664
+++ ChangeLog   25 Jul 2009 07:36:17 -0000      1.7665
@@ -1,3 +1,13 @@
+2009-07-25  Ken Raeburn  <address@hidden>
+
+       * lread.c: Rewrite 2009-07-21 changes.
+       (load_depth): Deleted.
+       (Qload_in_progress): New variable.
+       (load_unwind): Don't reference load_depth or load_in_progress.
+       (Fload): Likewise; specbind Qload_in_progress instead.
+       (init_lread): Don't initialize load_depth.
+       (syms_of_lread): Initialize and protect Qload_in_progress.
+
 2009-07-24  Adrian Robert  <address@hidden>
 
        * nsfont.m (ns_findfonts): Correctly return fallback in match case.

Index: lread.c
===================================================================
RCS file: /sources/emacs/emacs/src/lread.c,v
retrieving revision 1.407
retrieving revision 1.408
diff -u -b -r1.407 -r1.408
--- lread.c     21 Jul 2009 09:26:30 -0000      1.407
+++ lread.c     25 Jul 2009 07:36:19 -0000      1.408
@@ -99,9 +99,7 @@
 
 /* non-zero if inside `load' */
 int load_in_progress;
-
-/* Depth of nested `load' invocations.  */
-int load_depth;
+static Lisp_Object Qload_in_progress;
 
 /* Directory in which the sources were found.  */
 Lisp_Object Vsource_directory;
@@ -1253,8 +1251,7 @@
   specbind (Qinhibit_file_name_operation, Qnil);
   load_descriptor_list
     = Fcons (make_number (fileno (stream)), load_descriptor_list);
-  load_depth++;
-  load_in_progress = 1;
+  specbind (Qload_in_progress, Qt);
   if (! version || version >= 22)
     readevalloop (Qget_file_char, stream, hist_file_name,
                  Feval, 0, Qnil, Qnil, Qnil, Qnil);
@@ -1316,8 +1313,6 @@
       fclose (stream);
       UNBLOCK_INPUT;
     }
-  if (--load_depth < 0) load_depth = 0;
-  load_in_progress = load_depth > 0;
   return Qnil;
 }
 
@@ -4134,7 +4129,6 @@
   Vvalues = Qnil;
 
   load_in_progress = 0;
-  load_depth = 0;
   Vload_file_name = Qnil;
 
   load_descriptor_list = Qnil;
@@ -4258,6 +4252,8 @@
 
   DEFVAR_BOOL ("load-in-progress", &load_in_progress,
               doc: /* Non-nil if inside of `load'.  */);
+  Qload_in_progress = intern ("load-in-progress");
+  staticpro (&Qload_in_progress);
 
   DEFVAR_LISP ("after-load-alist", &Vafter_load_alist,
               doc: /* An alist of expressions to be evalled when particular 
files are loaded.




reply via email to

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