Commit 136eb6ed authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* data.c (store_symval_forwarding, set_internal):

* eval.c (specbind): Remove dead code.
parent bae72c12
2007-11-19 Stefan Monnier <monnier@iro.umontreal.ca> 2007-11-19 Stefan Monnier <monnier@iro.umontreal.ca>
* data.c (store_symval_forwarding, set_internal):
* eval.c (specbind): Remove dead code.
* coding.c (detect_coding, Fupdate_coding_systems_internal): * coding.c (detect_coding, Fupdate_coding_systems_internal):
* fns.c (Fmd5): Use find_symbol_value rather than SYMBOL_VALUE * fns.c (Fmd5): Use find_symbol_value rather than SYMBOL_VALUE
Since we do not want to see internal Lisp_*fwd objects here. Since we do not want to see internal Lisp_*fwd objects here.
......
...@@ -922,9 +922,11 @@ store_symval_forwarding (symbol, valcontents, newval, buf) ...@@ -922,9 +922,11 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
case Lisp_Misc_Intfwd: case Lisp_Misc_Intfwd:
CHECK_NUMBER (newval); CHECK_NUMBER (newval);
*XINTFWD (valcontents)->intvar = XINT (newval); *XINTFWD (valcontents)->intvar = XINT (newval);
/* This can never happen since intvar points to an EMACS_INT
which is at least large enough to hold a Lisp_Object.
if (*XINTFWD (valcontents)->intvar != XINT (newval)) if (*XINTFWD (valcontents)->intvar != XINT (newval))
error ("Value out of range for variable `%s'", error ("Value out of range for variable `%s'",
SDATA (SYMBOL_NAME (symbol))); SDATA (SYMBOL_NAME (symbol))); */
break; break;
case Lisp_Misc_Boolfwd: case Lisp_Misc_Boolfwd:
...@@ -1237,8 +1239,7 @@ set_internal (symbol, newval, buf, bindflag) ...@@ -1237,8 +1239,7 @@ set_internal (symbol, newval, buf, bindflag)
|| buf != XBUFFER (XBUFFER_LOCAL_VALUE (valcontents)->buffer) || buf != XBUFFER (XBUFFER_LOCAL_VALUE (valcontents)->buffer)
|| (XBUFFER_LOCAL_VALUE (valcontents)->check_frame || (XBUFFER_LOCAL_VALUE (valcontents)->check_frame
&& !EQ (selected_frame, XBUFFER_LOCAL_VALUE (valcontents)->frame)) && !EQ (selected_frame, XBUFFER_LOCAL_VALUE (valcontents)->frame))
|| (BUFFER_LOCAL_VALUEP (valcontents) || (EQ (XCAR (current_alist_element),
&& EQ (XCAR (current_alist_element),
current_alist_element))) current_alist_element)))
{ {
/* The currently loaded binding is not necessarily valid. /* The currently loaded binding is not necessarily valid.
......
...@@ -3263,7 +3263,6 @@ void ...@@ -3263,7 +3263,6 @@ void
specbind (symbol, value) specbind (symbol, value)
Lisp_Object symbol, value; Lisp_Object symbol, value;
{ {
Lisp_Object ovalue;
Lisp_Object valcontents; Lisp_Object valcontents;
CHECK_SYMBOL (symbol); CHECK_SYMBOL (symbol);
...@@ -3283,9 +3282,7 @@ specbind (symbol, value) ...@@ -3283,9 +3282,7 @@ specbind (symbol, value)
} }
else else
{ {
Lisp_Object valcontents; Lisp_Object ovalue = find_symbol_value (symbol);
ovalue = find_symbol_value (symbol);
specpdl_ptr->func = 0; specpdl_ptr->func = 0;
specpdl_ptr->old_value = ovalue; specpdl_ptr->old_value = ovalue;
...@@ -3330,9 +3327,13 @@ specbind (symbol, value) ...@@ -3330,9 +3327,13 @@ specbind (symbol, value)
specpdl_ptr->symbol = symbol; specpdl_ptr->symbol = symbol;
specpdl_ptr++; specpdl_ptr++;
/* We used to do
if (BUFFER_OBJFWDP (ovalue) || KBOARD_OBJFWDP (ovalue)) if (BUFFER_OBJFWDP (ovalue) || KBOARD_OBJFWDP (ovalue))
store_symval_forwarding (symbol, ovalue, value, NULL); store_symval_forwarding (symbol, ovalue, value, NULL);
else else
but ovalue comes from find_symbol_value which should never return
such an internal value. */
eassert (!(BUFFER_OBJFWDP (ovalue) || KBOARD_OBJFWDP (ovalue)));
set_internal (symbol, value, 0, 1); set_internal (symbol, value, 0, 1);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment