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
/* 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