From: Stefan Monnier Date: Tue, 25 Mar 2003 16:30:15 +0000 (+0000) Subject: (store_symval_forwarding): Delete special read-only X-Git-Tag: ttn-vms-21-2-B4~10754 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=999e64847e279e0b10464311207cc1cb4622dd43;p=emacs.git (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. --- diff --git a/src/data.c b/src/data.c index 2c7442c61aa..4d3be52075f 100644 --- a/src/data.c +++ b/src/data.c @@ -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;