Mercurial > emacs
changeset 85594:237166b2d28f
(Fmake_variable_buffer_local, Fmake_local_variable)
(Fmake_variable_frame_local): Just check the variable's const-ness
rather than checking nil or t.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 23 Oct 2007 20:56:27 +0000 |
parents | f51a2276e8b3 |
children | 4f5a9f3d91ae |
files | src/ChangeLog src/data.c |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Oct 23 17:41:15 2007 +0000 +++ b/src/ChangeLog Tue Oct 23 20:56:27 2007 +0000 @@ -1,3 +1,9 @@ +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.
--- a/src/data.c Tue Oct 23 17:41:15 2007 +0000 +++ b/src/data.c Tue Oct 23 20:56:27 2007 +0000 @@ -1521,7 +1521,7 @@ 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 @@ 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 @@ 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)));