From f62e1f39be4f7da2c78d884db6ecb68a9f5b1982 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 12 Jul 2022 14:39:52 +0200 Subject: [PATCH] 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. --- src/buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); } -- 2.39.5