From: Richard M. Stallman Date: Thu, 20 Jan 2000 06:02:13 +0000 (+0000) Subject: (set_internal): Fix the criteria for whether X-Git-Tag: emacs-pretest-21.0.90~5310 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8cc956425fac572883e29eb263f6f17b890824ce;p=emacs.git (set_internal): Fix the criteria for whether to swap out the old cached binding. --- diff --git a/src/ChangeLog b/src/ChangeLog index 3edfe5a6d72..2a14d959212 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2000-01-20 Richard M. Stallman + + * data.c (set_internal): Fix the criteria for whether + to swap out the old cached binding. + 2000-01-19 Dave Love * lread.c: (syms_of_lread) [user-init-file]: Doc change. diff --git a/src/data.c b/src/data.c index f4ee843a1a2..3f5fec2349b 100644 --- a/src/data.c +++ b/src/data.c @@ -1043,11 +1043,14 @@ set_internal (symbol, newval, buf, bindflag) currently cached, or if it's a Lisp_Buffer_Local_Value and we're looking at the default value, the cache is invalid; we need to write it out, and find the new CURRENT-ALIST-ELEMENT. */ - if (buf != XBUFFER (XBUFFER_LOCAL_VALUE (valcontents)->buffer) - || !EQ (selected_frame, XBUFFER_LOCAL_VALUE (valcontents)->frame) - || (BUFFER_LOCAL_VALUEP (valcontents) - && EQ (XCAR (current_alist_element), - current_alist_element))) + if ((XBUFFER_LOCAL_VALUE (valcontents)->found_for_buffer + && (buf != XBUFFER (XBUFFER_LOCAL_VALUE (valcontents)->buffer) + || (BUFFER_LOCAL_VALUEP (valcontents) + && EQ (XCAR (current_alist_element), + current_alist_element)))) + || + (XBUFFER_LOCAL_VALUE (valcontents)->found_for_frame + && !EQ (selected_frame, XBUFFER_LOCAL_VALUE (valcontents)->frame))) { /* Write out the cached value for the old buffer; copy it back to its alist element. This works if the current