From 5fbc0409ac3c51baf18d43b00ed00b56acc1c74b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 18 Jul 2012 11:20:33 -0400 Subject: [PATCH] * src/eval.c (Fdefvar): Don't check constants since we only set the var if it's not yet defined anyway. Fixes: debbugs:11904 --- src/ChangeLog | 3 +++ src/eval.c | 12 ------------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 42aff300ad6..b7e6b5b5fce 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2012-07-18 Stefan Monnier + * 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 diff --git a/src/eval.c b/src/eval.c index f16fdc6dd4c..da567e1e635 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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 -- 2.39.2