Mercurial > emacs
diff src/data.c @ 13593:e27c32c7d428
(Fmake_local_variable): Call find_symbol_value
before making a new local binding.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 19 Nov 1995 03:39:22 +0000 |
parents | 941c37982f37 |
children | 89ffc133f813 |
line wrap: on
line diff
--- a/src/data.c Sun Nov 19 03:37:43 1995 +0000 +++ b/src/data.c Sun Nov 19 03:39:22 1995 +0000 @@ -1284,6 +1284,11 @@ tem = Fassq (sym, current_buffer->local_var_alist); if (NILP (tem)) { + /* Swap out any local binding for some other buffer, and make + sure the current value is permanently recorded, if it's the + default value. */ + find_symbol_value (sym); + current_buffer->local_var_alist = Fcons (Fcons (sym, XCONS (XCONS (XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->cdr)->cdr)->cdr), current_buffer->local_var_alist); @@ -1292,7 +1297,9 @@ force it to look once again for this buffer's value */ { Lisp_Object *pvalbuf; + valcontents = XSYMBOL (sym)->value; + pvalbuf = &XCONS (XBUFFER_LOCAL_VALUE (valcontents)->cdr)->car; if (current_buffer == XBUFFER (*pvalbuf)) *pvalbuf = Qnil;