From: Devon Sean McCullough Date: Sat, 5 Jan 2019 15:36:22 +0000 (-0500) Subject: Fix UI of Buffer-menu X-Git-Tag: emacs-26.1.92~60 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d223727a7a15048b9963ebeb83b15962454aff0f;p=emacs.git 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) --- 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 ()