]> git.eshelyaron.com Git - emacs.git/commitdiff
Propagate Bug#14412 fix to backtrace_eval_unrewind
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 26 Dec 2015 17:30:22 +0000 (09:30 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 26 Dec 2015 17:32:03 +0000 (09:32 -0800)
* src/eval.c (unbind_to): Redo so that the FALLTHROUGH!! comment
becomes accurate again. This shouldn’t affect behavior.
(backtrace_eval_unrewind): Apply the recent unbind_to fix here, too.

src/eval.c

index 571681c318fe9ff12cde8dc91faf24a5c0e6dc87..bd0cf68369cdbeaa86867d07cee7a975656ac356 100644 (file)
@@ -3196,15 +3196,12 @@ unbind_to (ptrdiff_t count, Lisp_Object value)
          { /* 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.  */
-           Lisp_Object symbol = specpdl_symbol (specpdl_ptr);
-           if (SYMBOLP (symbol))
+           Lisp_Object sym = specpdl_symbol (specpdl_ptr);
+           if (SYMBOLP (sym) && XSYMBOL (sym)->redirect == SYMBOL_PLAINVAL)
              {
-               struct Lisp_Symbol *sym = XSYMBOL (symbol);
-               if (sym->redirect == SYMBOL_PLAINVAL)
-                 {
-                   SET_SYMBOL_VAL (sym, specpdl_old_value (specpdl_ptr));
-                   break;
-                 }
+               SET_SYMBOL_VAL (XSYMBOL (sym),
+                               specpdl_old_value (specpdl_ptr));
+               break;
              }
            else
              { /* FALLTHROUGH!!
@@ -3412,12 +3409,12 @@ backtrace_eval_unrewind (int distance)
          { /* 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.  */
-           struct Lisp_Symbol *sym = XSYMBOL (specpdl_symbol (tmp));
-           if (sym->redirect == SYMBOL_PLAINVAL)
+           Lisp_Object sym = specpdl_symbol (tmp);
+           if (SYMBOLP (sym) && XSYMBOL (sym)->redirect == SYMBOL_PLAINVAL)
              {
                Lisp_Object old_value = specpdl_old_value (tmp);
-               set_specpdl_old_value (tmp, SYMBOL_VAL (sym));
-               SET_SYMBOL_VAL (sym, old_value);
+               set_specpdl_old_value (tmp, SYMBOL_VAL (XSYMBOL (sym)));
+               SET_SYMBOL_VAL (XSYMBOL (sym), old_value);
                break;
              }
            else