From: Lars Ingebrigtsen Date: Tue, 12 Jul 2022 12:39:52 +0000 (+0200) Subject: Fix buffer-stale-function fix X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~16^2~1886^2~987 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f62e1f39be4f7da2c78d884db6ecb68a9f5b1982;p=emacs.git Fix buffer-stale-function fix * src/buffer.c (Fmake_indirect_buffer): Kill the local buffer-stale-function variable instead of setting it buffer-locally to the default value. This should have the same effect, but is less confusing. --- diff --git a/src/buffer.c b/src/buffer.c index a6d3604065e..e5fa09a9789 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -912,7 +912,7 @@ does not run the hooks `kill-buffer-hook', Fset (intern ("buffer-save-without-query"), Qnil); Fset (intern ("buffer-file-number"), Qnil); if (!NILP (Flocal_variable_p (Qbuffer_stale_function, base_buffer))) - Fset (Qbuffer_stale_function, Qbuffer_stale__default_function); + Fkill_local_variable (Qbuffer_stale_function); /* Cloned buffers need extra setup, to do things such as deep variable copies for list variables that might be mangled due to destructive operations in the indirect buffer. */ @@ -6480,7 +6480,6 @@ will run for `clone-indirect-buffer' calls as well. */); DEFSYM (Qkill_buffer__possibly_save, "kill-buffer--possibly-save"); DEFSYM (Qbuffer_stale_function, "buffer-stale-function"); - DEFSYM (Qbuffer_stale__default_function, "buffer-stale--default-function"); Fput (intern_c_string ("erase-buffer"), Qdisabled, Qt); }