From 4011d4b1ab7f73d5188aaa78defd78feed2f764c Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Sun, 21 Aug 2022 02:57:59 +0200 Subject: Emacs: Change jd/kill-other-buffers func --- Emacs.org | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Emacs.org') diff --git a/Emacs.org b/Emacs.org index 8e4330e..4e61821 100644 --- a/Emacs.org +++ b/Emacs.org @@ -330,16 +330,14 @@ #+begin_src emacs-lisp - (defun jd/kill-other-buffers () - (interactive) - (dolist (buffer (buffer-list)) - (when (not (equal (current-buffer) buffer)) - (kill-buffer buffer))) - (delete-other-windows)) + (defun jd/kill-other-buffers () + (interactive) + (mapc 'kill-buffer (cdr (buffer-list (current-buffer))))) (jd/leader-key-def - "bk" '(kill-this-buffer :which-key "Kill buffer") "bK" '(jd/kill-other-buffers :which-key "Kill other buffers")) + "bk" '(kill-current-buffer :which-key "Kill buffer") + "bB" '(ibuffer :which-key "Open ibuffer")) #+end_src -- cgit v1.2.3