summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Rommel <mail@florommel.de>2026-03-14 11:58:01 +0100
committerFlorian Rommel <mail@florommel.de>2026-03-14 12:04:39 +0100
commit56f6058ebef35f95700f1bee6ebe96b0760bdb18 (patch)
treea30da5f53b498f850795d46841de9a4af2367cfa
parentb2b9bd9f59d267d223ec2b1a52d00803361b863f (diff)
Disconnect frame bookmark in 'bufferlo-delete-frame-kill-buffers'externals/bufferlo
Clear the frame bookmark after killing the buffers but before deleting the frame. This prevents the auto-save feature from overwriting an existing bookmark with the empty buffer list. * bufferlo.el (bufferlo-delete-frame-kill-buffers): Clear bookmark.
-rw-r--r--bufferlo.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/bufferlo.el b/bufferlo.el
index 3f52e8d..5cadee2 100644
--- a/bufferlo.el
+++ b/bufferlo.el
@@ -1960,6 +1960,11 @@ argument INTERNAL-TOO is non-nil."
;; delete windows *and* their frame so we have to test if
;; the frame in question is still live.
(when (frame-live-p frame)
+ ;; Something could go wrong while trying to delete the frame.
+ ;; Since we already killed all buffers we disconnect the bookmark.
+ ;; This prevents the auto-save feature from overwriting an existing
+ ;; bookmark with the empty buffer list.
+ (set-frame-parameter frame 'bufferlo-bookmark-frame-name nil)
;; TODO: Emacs 30 frame-deletable-p
;; account for top-level, non-child frames
(when (= 1 (length (seq-filter