changeset 50305:77bee06b14c5

(store_symval_forwarding): Delete special read-only hack for type == -1, since we now use ->constant instead. (Fkill_local_variable): Don't use XBUFFER if it can be nil.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 25 Mar 2003 16:30:15 +0000
parents d9d826db650f
children 2f19a8ed285b
files src/data.c
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/data.c	Tue Mar 25 16:20:38 2003 +0000
+++ b/src/data.c	Tue Mar 25 16:30:15 2003 +0000
@@ -897,10 +897,6 @@
 	    int offset = XBUFFER_OBJFWD (valcontents)->offset;
 	    Lisp_Object type;
 
-	    type = PER_BUFFER_TYPE (offset);
-	    if (XINT (type) == -1)
-	      error ("Variable %s is read-only", SDATA (SYMBOL_NAME (symbol)));
-
 	    if (! NILP (type) && ! NILP (newval)
 		&& XTYPE (newval) != XINT (type))
 	      buffer_slot_type_mismatch (offset);
@@ -1616,10 +1612,11 @@
      loaded, recompute its value.  We have to do it now, or else
      forwarded objects won't work right.  */
   {
-    Lisp_Object *pvalbuf;
+    Lisp_Object *pvalbuf, buf;
     valcontents = SYMBOL_VALUE (variable);
     pvalbuf = &XBUFFER_LOCAL_VALUE (valcontents)->buffer;
-    if (current_buffer == XBUFFER (*pvalbuf))
+    XSETBUFFER (buf, current_buffer);
+    if (EQ (buf, *pvalbuf))
       {
 	*pvalbuf = Qnil;
 	XBUFFER_LOCAL_VALUE (valcontents)->found_for_buffer = 0;