From b7ff372b72577439f6a91430d97720bd068b7bd2 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Tue, 17 Nov 2026 00:04:14 +0100 Subject: [PATCH] Use hy-delete-files-and-buffers Reverting the part of commit f5b3791c that deletes the wiki-page. Not sure why I concluded that had to be changed. The stock hy-delete-files-and-buffers is better. * test/hywiki-tests.el (hywiki-tests--preserve-hywiki-mode): Use hy-delete-files-and-buffers for removing the wiki-page. Reverts the change in commit f5b3791c. --- ChangeLog | 6 ++++++ test/hywiki-tests.el | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3da74f77..3303c514 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2026-11-17 Mats Lidell + +* test/hywiki-tests.el (hywiki-tests--preserve-hywiki-mode): Use + hy-delete-files-and-buffers for removing the wiki-page. Reverts the + change in commit f5b3791c. + 2026-11-16 Mats Lidell * test/hy-test-coverage.el (hy-test-coverage-file): Use absolute diff --git a/test/hywiki-tests.el b/test/hywiki-tests.el index 2d19e1f8..ee8652a2 100644 --- a/test/hywiki-tests.el +++ b/test/hywiki-tests.el @@ -333,11 +333,7 @@ and remove it." ;; after `hywiki-mode' is enabled. (setq wiki-page (cdr (hywiki-add-page "WikiWord" nil t))) ,@body) - (let ((buf (get-file-buffer wiki-page))) - (when buf - (kill-buffer buf)) - (delete-file wiki-page)) - (hy-delete-file-and-buffer (hywiki-cache-default-file)) + (hy-delete-files-and-buffers (list wiki-page hywiki-cache-default-file)) (hywiki-tests--delete-hywiki-dir-and-buffer hywiki-directory) (unless (eq hywiki-mode prior-hywiki-mode) (setq hywiki-directory prior-hywiki-directory)