+ {
+ ovalue = find_symbol_value (symbol);
+ specpdl_ptr->func = 0;
+ specpdl_ptr->old_value = ovalue;
+
+ if (BUFFER_LOCAL_VALUEP (XSYMBOL (symbol)->value)
+ || SOME_BUFFER_LOCAL_VALUEP (XSYMBOL (symbol)->value)
+ || BUFFER_OBJFWDP (XSYMBOL (symbol)->value))
+ {
+ Lisp_Object current_buffer, binding_buffer;
+ /* For a local variable, record both the symbol and which
+ buffer's value we are saving. */
+ current_buffer = Fcurrent_buffer ();
+ binding_buffer = current_buffer;
+ /* If the variable is not local in this buffer,
+ we are saving the global value, so restore that. */
+ if (NILP (Flocal_variable_p (symbol, binding_buffer)))
+ binding_buffer = Qnil;
+ specpdl_ptr->symbol
+ = Fcons (symbol, Fcons (binding_buffer, current_buffer));
+ }
+ else
+ specpdl_ptr->symbol = symbol;
+
+ specpdl_ptr++;
+ if (BUFFER_OBJFWDP (ovalue) || KBOARD_OBJFWDP (ovalue))
+ store_symval_forwarding (symbol, ovalue, value);
+ else
+ set_internal (symbol, value, 0, 1);
+ }