[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 91da2775: Keep preview images when killing indirect buffer (bug#6
From: |
Ikumi Keita |
Subject: |
master 91da2775: Keep preview images when killing indirect buffer (bug#65462) |
Date: |
Mon, 28 Aug 2023 00:39:39 -0400 (EDT) |
branch: master
commit 91da27754be7f3728858fc27eb4b7866cecd591c
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Keep preview images when killing indirect buffer (bug#65462)
* preview.el.in (preview-kill-buffer-cleanup): Don't clearout in
indirect buffer.
Fix filling of doc string.
---
preview.el.in | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/preview.el.in b/preview.el.in
index e26f478c..af0997aa 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -2290,13 +2290,14 @@ all previews."
(defun preview-kill-buffer-cleanup (&optional buf)
"This is a cleanup function just for use in hooks.
Cleans BUF or current buffer. The difference to
-`preview-clearout-buffer' is that previews
-associated with the last buffer modification time are
-kept."
- (with-current-buffer (or buf (current-buffer))
- (save-restriction
- (widen)
- (preview-clearout (point-min) (point-max) (visited-file-modtime)))))
+`preview-clearout-buffer' is that previews associated with the
+last buffer modification time are kept."
+ ;; Do nothing for indirect buffers. (bug#65462)
+ (unless (buffer-base-buffer (or buf (setq buf (current-buffer))))
+ (with-current-buffer buf
+ (save-restriction
+ (widen)
+ (preview-clearout (point-min) (point-max) (visited-file-modtime))))))
(add-hook 'kill-buffer-hook #'preview-kill-buffer-cleanup)
(add-hook 'before-revert-hook #'preview-kill-buffer-cleanup)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 91da2775: Keep preview images when killing indirect buffer (bug#65462),
Ikumi Keita <=