From d223727a7a15048b9963ebeb83b15962454aff0f Mon Sep 17 00:00:00 2001 From: Devon Sean McCullough Date: Sat, 5 Jan 2019 10:36:22 -0500 Subject: [PATCH] Fix UI of Buffer-menu * lisp/buff-menu.el (Buffer-menu-execute): Don't remove entries of buffers whose killing the user didn't confirm. (Bug#33669) --- lisp/buff-menu.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index f0b96b0c5ea..5f889866361 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -475,10 +475,10 @@ Buffers marked with \\`\\[Buffer-menu-delete]' are deleted (save-buffer)) (tabulated-list-set-col 2 " " t)) (error (warn "Error saving %s" buffer)))) - (if delete - (unless (eq buffer (current-buffer)) - (kill-buffer buffer) - (tabulated-list-delete-entry)) + (if (and delete + (not (eq buffer (current-buffer))) + (kill-buffer buffer)) + (tabulated-list-delete-entry) (forward-line 1))))))))) (defun Buffer-menu-select () -- 2.39.2