1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/b94d6e89ea5b/
Changeset: b94d6e89ea5b
User: kehoea
Date: 2014-06-18 10:26:54
Summary: Correct a couple of small things with my last change.
src/ChangeLog addition:
2014-06-18 Aidan Kehoe <kehoea(a)parhasard.net>
Correct a couple of things in my last change.
* extents.h:
Make #'delete-extent available.
* window.c:
* window.c (delete_saved_point): New.
* window.c (Fdelete_window): Delete the saved point extents on
deletion of the window, since otherwise they will only be
garbage-collected when the buffer is.
* window.c (Fset_window_buffer): Correct a thinko here, use a
saved point when it *hasn't* been detached.
Affected #: 3 files
diff -r a1808d52a34a15175e99534534b4a3668135bbda -r
b94d6e89ea5b88a2e428575dac03d665ca21bf0b src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
+2014-06-18 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ Correct a couple of things in my last change.
+ * extents.h:
+ Make #'delete-extent available.
+ * window.c:
+ * window.c (delete_saved_point): New.
+ * window.c (Fdelete_window): Delete the saved point extents on
+ deletion of the window, since otherwise they will only be
+ garbage-collected when the buffer is.
+ * window.c (Fset_window_buffer): Correct a thinko here, use a
+ saved point when it *hasn't* been detached.
+
2014-06-17 Aidan Kehoe <kehoea(a)parhasard.net>
* extents.h:
diff -r a1808d52a34a15175e99534534b4a3668135bbda -r
b94d6e89ea5b88a2e428575dac03d665ca21bf0b src/extents.h
--- a/src/extents.h
+++ b/src/extents.h
@@ -133,6 +133,7 @@
EXFUN (Fput_text_property, 5);
EXFUN (Fextent_detached_p, 1);
+EXFUN (Fdelete_extent, 1);
EXFUN (Fdetach_extent, 1);
EXFUN (Fextent_end_position, 1);
EXFUN (Fextent_object, 1);
diff -r a1808d52a34a15175e99534534b4a3668135bbda -r
b94d6e89ea5b88a2e428575dac03d665ca21bf0b src/window.c
--- a/src/window.c
+++ b/src/window.c
@@ -2206,6 +2206,14 @@
return 0;
}
+static int
+delete_saved_point (Lisp_Object UNUSED (buffer), Lisp_Object saved_point,
+ void *UNUSED (closure))
+{
+ Fdelete_extent (saved_point);
+ return 0;
+}
+
DEFUN ("delete-window", Fdelete_window, 0, 2, "", /*
Remove WINDOW from the display. Default is selected window.
If window is the only one on its frame, the frame is deleted as well.
@@ -2319,6 +2327,11 @@
w->buffer = Qnil;
}
+ /* Delete the saved point extents, since they will still be referenced
+ from the buffer and thus won't be garbage-collected until the buffer
+ is. */
+ elisp_maphash_unsafe (delete_saved_point, w->saved_point_cache, NULL);
+
/* close up the hole in the sibling list */
if (!NILP (w->next))
XWINDOW (w->next)->prev = w->prev;
@@ -3725,7 +3738,7 @@
{
Lisp_Object saved_point = Fgethash (buffer, w->saved_point_cache, Qnil);
Lisp_Object newpoint =
- (EXTENTP (saved_point) && !NILP (Fextent_detached_p (saved_point)))
+ (EXTENTP (saved_point) && NILP (Fextent_detached_p (saved_point)))
? Fextent_start_position (saved_point)
: make_fixnum (BUF_PT (XBUFFER (buffer)));
Lisp_Object marker;
Repository URL:
https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches