Commit 5fbc0409 authored by Stefan Monnier's avatar Stefan Monnier

* src/eval.c (Fdefvar): Don't check constants since we only set the var if

it's not yet defined anyway.

Fixes: debbugs:11904
parent eceb6feb
2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
* eval.c (Fdefvar): Don't check constants since we only set the var if
it's not yet defined anyway (bug#11904).
* lisp.h (last_undo_boundary): Declare new var.
* keyboard.c (command_loop_1): Set it.
* cmds.c (Fself_insert_command): Use it to only remove boundaries that
......
......@@ -691,18 +691,6 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */)
/* Do it before evaluating the initial value, for self-references. */
XSYMBOL (sym)->declared_special = 1;
if (SYMBOL_CONSTANT_P (sym))
{
/* For upward compatibility, allow (defvar :foo (quote :foo)). */
Lisp_Object tem1 = Fcar (tail);
if (! (CONSP (tem1)
&& EQ (XCAR (tem1), Qquote)
&& CONSP (XCDR (tem1))
&& EQ (XCAR (XCDR (tem1)), sym)))
error ("Constant symbol `%s' specified in defvar",
SDATA (SYMBOL_NAME (sym)));
}
if (NILP (tem))
Fset_default (sym, eval_sub (Fcar (tail)));
else
......
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