]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix UI of Buffer-menu
authorDevon Sean McCullough <Emacs-Hacker2018@jovi.net>
Sat, 5 Jan 2019 15:36:22 +0000 (10:36 -0500)
committerEli Zaretskii <eliz@gnu.org>
Sat, 12 Jan 2019 11:51:50 +0000 (13:51 +0200)
* 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

index f0b96b0c5eae067b935be90b265ed4586e788343..5f889866361d1cb98f4a3ab2d65667375f7afa61 100644 (file)
@@ -475,10 +475,10 @@ Buffers marked with \\<Buffer-menu-mode-map>`\\[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 ()