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
commitd924e81441d3cce1e40ed16fffdba102a1538879 (patch)
tree390ea15d4a770eee73f9cc2b75b10fde1148f8f0 /modules/ui-navigation.el
parent42a6218670b92ff11a7fc9cc986775b45c07bff1 (diff)
downloaddotemacs-d924e81441d3cce1e40ed16fffdba102a1538879.tar.gz
dotemacs-d924e81441d3cce1e40ed16fffdba102a1538879.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 fba9153c..e9c9eaf2 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)))