]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fmake_local_variable): Call find_symbol_value
authorRichard M. Stallman <rms@gnu.org>
Sun, 19 Nov 1995 03:39:22 +0000 (03:39 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 19 Nov 1995 03:39:22 +0000 (03:39 +0000)
before making a new local binding.

src/data.c

index 3394cdb147c42eb641f8c3390d4bcfbc7dee6a34..1a2c68a4e44fee6258182adee4ebfb1ba74fbc19 100644 (file)
@@ -1284,6 +1284,11 @@ Use `make-local-hook' instead.")
   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 @@ Use `make-local-hook' instead.")
         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;