+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.
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))
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)
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)));