unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46914: [PATCH] Call the set_buffer_overlays setters
@ 2021-03-04  2:24 Matt Armstrong
  2021-03-04 20:12 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Armstrong @ 2021-03-04  2:24 UTC (permalink / raw)
  To: 46914

[-- Attachment #1: Type: text/plain, Size: 72 bytes --]

`kill-buffer' was an oddball function.  With this patch it is less so.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Call-the-set_buffer_overlays_-setters.patch --]
[-- Type: text/x-patch, Size: 1089 bytes --]

From dfe95ffc6a091d44a22854344f43215074a8fe05 Mon Sep 17 00:00:00 2001
From: Matt Armstrong <matt@mdeb>
Date: Wed, 3 Mar 2021 16:02:52 -0800
Subject: [PATCH] Call the set_buffer_overlays_ setters

Apart from the setters themselves, this is the only place the fields
were set directly.

* src/buffer.c (Fkill_buffer): Call set_buffer_overlays_before and
set_buffer_overlays_after instead of setting the fields directly.
---
 src/buffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/buffer.c b/src/buffer.c
index 5bd9b37702..03c10cc7ae 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1942,8 +1942,8 @@ DEFUN ("kill-buffer", Fkill_buffer, Skill_buffer, 0, 1, "bKill buffer: ",
     }
   /* Since we've unlinked the markers, the overlays can't be here any more
      either.  */
-  b->overlays_before = NULL;
-  b->overlays_after = NULL;
+  set_buffer_overlays_before (b, NULL);
+  set_buffer_overlays_after (b, NULL);
 
   /* Reset the local variables, so that this buffer's local values
      won't be protected from GC.  They would be protected
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#46914: [PATCH] Call the set_buffer_overlays setters
  2021-03-04  2:24 bug#46914: [PATCH] Call the set_buffer_overlays setters Matt Armstrong
@ 2021-03-04 20:12 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-03-04 20:12 UTC (permalink / raw)
  To: Matt Armstrong; +Cc: 46914

Matt Armstrong <matt@rfc20.org> writes:

> Apart from the setters themselves, this is the only place the fields
> were set directly.
>
> * src/buffer.c (Fkill_buffer): Call set_buffer_overlays_before and
> set_buffer_overlays_after instead of setting the fields directly.

Makes sense; pushed to Emacs 28 now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-04 20:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04  2:24 bug#46914: [PATCH] Call the set_buffer_overlays setters Matt Armstrong
2021-03-04 20:12 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).