emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/eval.c


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/src/eval.c
Date: Fri, 09 May 2003 10:01:12 -0400

Index: emacs/src/eval.c
diff -c emacs/src/eval.c:1.208 emacs/src/eval.c:1.209
*** emacs/src/eval.c:1.208      Thu May  1 15:38:05 2003
--- emacs/src/eval.c    Fri May  9 10:01:12 2003
***************
*** 117,123 ****
  
  /* Pointer to first unused element in specpdl.  */
  
! struct specbinding *specpdl_ptr;
  
  /* Maximum size allowed for specpdl allocation */
  
--- 117,123 ----
  
  /* Pointer to first unused element in specpdl.  */
  
! volatile struct specbinding *specpdl_ptr;
  
  /* Maximum size allowed for specpdl allocation */
  
***************
*** 3070,3079 ****
  
    while (specpdl_ptr != specpdl + count)
      {
!       --specpdl_ptr;
  
!       if (specpdl_ptr->func != 0)
!       (*specpdl_ptr->func) (specpdl_ptr->old_value);
        /* If the symbol is a list, it is really (SYMBOL WHERE
         . CURRENT-BUFFER) where WHERE is either nil, a buffer, or a
         frame.  If WHERE is a buffer or frame, this indicates we
--- 3070,3085 ----
  
    while (specpdl_ptr != specpdl + count)
      {
!       /* Copy the binding, and decrement specpdl_ptr, before we do
!        the work to unbind it.  We decrement first
!        so that an error in unbinding won't try to unbind
!        the same entry again, and we copy the binding first
!        in case more bindings are made during some of the code we run.  */
  
!       struct specbinding this_binding = *--specpdl_ptr;
! 
!       if (this_binding.func != 0)
!       (*this_binding.func) (this_binding.old_value);
        /* If the symbol is a list, it is really (SYMBOL WHERE
         . CURRENT-BUFFER) where WHERE is either nil, a buffer, or a
         frame.  If WHERE is a buffer or frame, this indicates we
***************
*** 3081,3109 ****
         binding.  WHERE nil means that the variable had the default
         value when it was bound.  CURRENT-BUFFER is the buffer that
           was current when the variable was bound.  */
!       else if (CONSP (specpdl_ptr->symbol))
        {
          Lisp_Object symbol, where;
  
!         symbol = XCAR (specpdl_ptr->symbol);
!         where = XCAR (XCDR (specpdl_ptr->symbol));
  
          if (NILP (where))
!           Fset_default (symbol, specpdl_ptr->old_value);
          else if (BUFFERP (where))
!           set_internal (symbol, specpdl_ptr->old_value, XBUFFER (where), 1);
          else
!           set_internal (symbol, specpdl_ptr->old_value, NULL, 1);
        }
        else
        {
          /* If variable has a trivial value (no forwarding), we can
             just set it.  No need to check for constant symbols here,
             since that was already done by specbind.  */
!         if (!MISCP (SYMBOL_VALUE (specpdl_ptr->symbol)))
!           SET_SYMBOL_VALUE (specpdl_ptr->symbol, specpdl_ptr->old_value);
          else
!           set_internal (specpdl_ptr->symbol, specpdl_ptr->old_value, 0, 1);
        }
      }
  
--- 3087,3115 ----
         binding.  WHERE nil means that the variable had the default
         value when it was bound.  CURRENT-BUFFER is the buffer that
           was current when the variable was bound.  */
!       else if (CONSP (this_binding.symbol))
        {
          Lisp_Object symbol, where;
  
!         symbol = XCAR (this_binding.symbol);
!         where = XCAR (XCDR (this_binding.symbol));
  
          if (NILP (where))
!           Fset_default (symbol, this_binding.old_value);
          else if (BUFFERP (where))
!           set_internal (symbol, this_binding.old_value, XBUFFER (where), 1);
          else
!           set_internal (symbol, this_binding.old_value, NULL, 1);
        }
        else
        {
          /* If variable has a trivial value (no forwarding), we can
             just set it.  No need to check for constant symbols here,
             since that was already done by specbind.  */
!         if (!MISCP (SYMBOL_VALUE (this_binding.symbol)))
!           SET_SYMBOL_VALUE (this_binding.symbol, this_binding.old_value);
          else
!           set_internal (this_binding.symbol, this_binding.old_value, 0, 1);
        }
      }
  




reply via email to

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