changeset 63790:b5df2fc9aa4e

(Fdefvar): Don't try to set constant symbols.
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 27 Jun 2005 05:59:23 +0000
parents ac833c86f212
children b2a6e4deb0ef
files src/eval.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c	Mon Jun 27 00:17:06 2005 +0000
+++ b/src/eval.c	Mon Jun 27 05:59:23 2005 +0000
@@ -806,6 +806,10 @@
   register Lisp_Object sym, tem, tail;
 
   sym = Fcar (args);
+  if (SYMBOL_CONSTANT_P (sym))
+    error ("Cannot defvar a constant symbol: %s",
+           SDATA (SYMBOL_NAME (sym)));
+
   tail = Fcdr (args);
   if (!NILP (Fcdr (Fcdr (tail))))
     error ("Too many arguments");