aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 9fcae96e8b2..8663ff30589 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1472,7 +1472,7 @@ set_buffer_internal_1 (b)
1472 valcontents = XSYMBOL (XCONS (XCONS (tail)->car)->car)->value; 1472 valcontents = XSYMBOL (XCONS (XCONS (tail)->car)->car)->value;
1473 if ((BUFFER_LOCAL_VALUEP (valcontents) 1473 if ((BUFFER_LOCAL_VALUEP (valcontents)
1474 || SOME_BUFFER_LOCAL_VALUEP (valcontents)) 1474 || SOME_BUFFER_LOCAL_VALUEP (valcontents))
1475 && (tem = XBUFFER_LOCAL_VALUE (valcontents)->car, 1475 && (tem = XBUFFER_LOCAL_VALUE (valcontents)->realvalue,
1476 (BOOLFWDP (tem) || INTFWDP (tem) || OBJFWDP (tem)))) 1476 (BOOLFWDP (tem) || INTFWDP (tem) || OBJFWDP (tem))))
1477 /* Just reference the variable 1477 /* Just reference the variable
1478 to cause it to become set for this buffer. */ 1478 to cause it to become set for this buffer. */
@@ -1487,7 +1487,7 @@ set_buffer_internal_1 (b)
1487 valcontents = XSYMBOL (XCONS (XCONS (tail)->car)->car)->value; 1487 valcontents = XSYMBOL (XCONS (XCONS (tail)->car)->car)->value;
1488 if ((BUFFER_LOCAL_VALUEP (valcontents) 1488 if ((BUFFER_LOCAL_VALUEP (valcontents)
1489 || SOME_BUFFER_LOCAL_VALUEP (valcontents)) 1489 || SOME_BUFFER_LOCAL_VALUEP (valcontents))
1490 && (tem = XBUFFER_LOCAL_VALUE (valcontents)->car, 1490 && (tem = XBUFFER_LOCAL_VALUE (valcontents)->realvalue,
1491 (BOOLFWDP (tem) || INTFWDP (tem) || OBJFWDP (tem)))) 1491 (BOOLFWDP (tem) || INTFWDP (tem) || OBJFWDP (tem))))
1492 /* Just reference the variable 1492 /* Just reference the variable
1493 to cause it to become set for this buffer. */ 1493 to cause it to become set for this buffer. */
@@ -1894,26 +1894,26 @@ swap_out_buffer_local_variables (b)
1894 sym = XCONS (XCONS (alist)->car)->car; 1894 sym = XCONS (XCONS (alist)->car)->car;
1895 1895
1896 /* Need not do anything if some other buffer's binding is now encached. */ 1896 /* Need not do anything if some other buffer's binding is now encached. */
1897 tem = XCONS (XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->cdr)->car; 1897 tem = XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->buffer;
1898 if (XBUFFER (tem) == current_buffer) 1898 if (XBUFFER (tem) == current_buffer)
1899 { 1899 {
1900 /* Symbol is set up for this buffer's old local value. 1900 /* Symbol is set up for this buffer's old local value.
1901 Set it up for the current buffer with the default value. */ 1901 Set it up for the current buffer with the default value. */
1902 1902
1903 tem = XCONS (XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->cdr)->cdr; 1903 tem = XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->cdr;
1904 /* Store the symbol's current value into the alist entry 1904 /* Store the symbol's current value into the alist entry
1905 it is currently set up for. This is so that, if the 1905 it is currently set up for. This is so that, if the
1906 local is marked permanent, and we make it local again 1906 local is marked permanent, and we make it local again
1907 later in Fkill_all_local_variables, we don't lose the value. */ 1907 later in Fkill_all_local_variables, we don't lose the value. */
1908 XCONS (XCONS (tem)->car)->cdr 1908 XCONS (XCONS (tem)->car)->cdr
1909 = do_symval_forwarding (XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->car); 1909 = do_symval_forwarding (XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->realvalue);
1910 /* Switch to the symbol's default-value alist entry. */ 1910 /* Switch to the symbol's default-value alist entry. */
1911 XCONS (tem)->car = tem; 1911 XCONS (tem)->car = tem;
1912 /* Mark it as current for buffer B. */ 1912 /* Mark it as current for buffer B. */
1913 XCONS (XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->cdr)->car 1913 XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->buffer = buffer;
1914 = buffer;
1915 /* Store the current value into any forwarding in the symbol. */ 1914 /* Store the current value into any forwarding in the symbol. */
1916 store_symval_forwarding (sym, XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->car, 1915 store_symval_forwarding (sym,
1916 XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->realvalue,
1917 XCONS (tem)->cdr); 1917 XCONS (tem)->cdr);
1918 } 1918 }
1919 } 1919 }
@@ -3917,6 +3917,8 @@ init_buffer ()
3917 int rc; 3917 int rc;
3918 3918
3919 Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); 3919 Fset_buffer (Fget_buffer_create (build_string ("*scratch*")));
3920 if (NILP (buffer_defaults.enable_multibyte_characters))
3921 Fset_buffer_multibyte (Qnil);
3920 3922
3921 /* If PWD is accurate, use it instead of calling getwd. This is faster 3923 /* If PWD is accurate, use it instead of calling getwd. This is faster
3922 when PWD is right, and may avoid a fatal error. */ 3924 when PWD is right, and may avoid a fatal error. */