Commit 7357cb04 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(Fmake_variable_buffer_local, Fmake_local_variable)

(Fmake_variable_frame_local): Just check the variable's const-ness
rather than checking nil or t.
parent 93137d49
2007-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* data.c (Fmake_variable_buffer_local, Fmake_local_variable)
(Fmake_variable_frame_local): Just check the variable's const-ness
rather than checking nil or t.
2007-10-22 Jason Rumney <jasonr@gnu.org>
* w32fns.c: Include math.h.
......
......@@ -1521,7 +1521,7 @@ The function `default-value' gets the default value and `set-default' sets it.
variable = indirect_variable (variable);
valcontents = SYMBOL_VALUE (variable);
if (EQ (variable, Qnil) || EQ (variable, Qt) || KBOARD_OBJFWDP (valcontents))
if (XSYMBOL (variable)->constant || KBOARD_OBJFWDP (valcontents))
error ("Symbol %s may not be buffer-local", SDATA (SYMBOL_NAME (variable)));
if (BUFFER_OBJFWDP (valcontents))
......@@ -1578,7 +1578,7 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */)
variable = indirect_variable (variable);
valcontents = SYMBOL_VALUE (variable);
if (EQ (variable, Qnil) || EQ (variable, Qt) || KBOARD_OBJFWDP (valcontents))
if (XSYMBOL (variable)->constant || KBOARD_OBJFWDP (valcontents))
error ("Symbol %s may not be buffer-local", SDATA (SYMBOL_NAME (variable)));
if ((BUFFER_LOCAL_VALUEP (valcontents)
......@@ -1733,7 +1733,7 @@ Buffer-local bindings take precedence over frame-local bindings. */)
variable = indirect_variable (variable);
valcontents = SYMBOL_VALUE (variable);
if (EQ (variable, Qnil) || EQ (variable, Qt) || KBOARD_OBJFWDP (valcontents)
if (XSYMBOL (variable)->constant || KBOARD_OBJFWDP (valcontents)
|| BUFFER_OBJFWDP (valcontents))
error ("Symbol %s may not be frame-local", SDATA (SYMBOL_NAME (variable)));
......
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