]> code.delx.au - gnu-emacs/commitdiff
(store_symval_forwarding): Delete special read-only
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 25 Mar 2003 16:30:15 +0000 (16:30 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 25 Mar 2003 16:30:15 +0000 (16:30 +0000)
hack for type == -1, since we now use ->constant instead.
(Fkill_local_variable): Don't use XBUFFER if it can be nil.

src/data.c

index 2c7442c61aa91ac253a3863f4a8d8f2dda106267..4d3be52075f368c686e9072ffc243bf9be6d8fd5 100644 (file)
@@ -897,10 +897,6 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
            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 @@ From now on the default value will apply in this buffer.  Return VARIABLE.  */)
      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;