aboutsummaryrefslogtreecommitdiff
path: root/modules/ui-navigation.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-15 21:52:30 -0500
committerCraig Jennings <c@cjennings.net>2026-06-15 21:52:30 -0500
commitd1f8c182ff3301e0bd581dbccb43c3c0a71102ca (patch)
treeabddfa38bc737eb5aa3f63ec514621209e6ba196 /modules/ui-navigation.el
parent984b72b3103e663f6084107eed2f2f5f9016f66f (diff)
downloaddotemacs-d1f8c182ff3301e0bd581dbccb43c3c0a71102ca.tar.gz
dotemacs-d1f8c182ff3301e0bd581dbccb43c3c0a71102ca.zip
fix(ui-navigation): undo-kill-buffer skips open files via equal
The visited-file filter used delq, comparing expand-file-name strings by eq, so an already-open file was never removed from the candidates (the skip logic was dead). Use delete (equal). Adds a test with the open file at the head of the list, where the eq/equal difference actually shows.
Diffstat (limited to 'modules/ui-navigation.el')
-rw-r--r--modules/ui-navigation.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/ui-navigation.el b/modules/ui-navigation.el
index fba9153c2..e9c9eaf26 100644
--- a/modules/ui-navigation.el
+++ b/modules/ui-navigation.el
@@ -203,8 +203,11 @@ With numeric prefix ARG, re-open the ARGth most-recently-killed file
(buffer-list)))))
(mapc
(lambda (buf-file)
+ ;; delete (equal), not delq (eq): buf-file is a fresh string from
+ ;; expand-file-name and never eq to the recentf-list entries, so the
+ ;; skip-open-files logic was dead.
(setq recently-killed-list
- (delq buf-file recently-killed-list)))
+ (delete buf-file recently-killed-list)))
buffer-files-list)
(when recently-killed-list
(let ((file (nth (1- arg) recently-killed-list)))