diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2022-08-21 02:57:59 +0200 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2022-08-21 02:57:59 +0200 |
commit | 4011d4b1ab7f73d5188aaa78defd78feed2f764c (patch) | |
tree | 1d12d36c26da51568996ca30241fe3620e62ba1f /Emacs.org | |
parent | 5e826966c05c50f1a0366bcfdaf5eee4be8f9aa6 (diff) | |
download | dotfiles-4011d4b1ab7f73d5188aaa78defd78feed2f764c.tar.gz dotfiles-4011d4b1ab7f73d5188aaa78defd78feed2f764c.zip |
Emacs: Change jd/kill-other-buffers func
Diffstat (limited to 'Emacs.org')
-rw-r--r-- | Emacs.org | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -330,16 +330,14 @@ | |||
330 | 330 | ||
331 | #+begin_src emacs-lisp | 331 | #+begin_src emacs-lisp |
332 | 332 | ||
333 | (defun jd/kill-other-buffers () | 333 | (defun jd/kill-other-buffers () |
334 | (interactive) | 334 | (interactive) |
335 | (dolist (buffer (buffer-list)) | 335 | (mapc 'kill-buffer (cdr (buffer-list (current-buffer))))) |
336 | (when (not (equal (current-buffer) buffer)) | ||
337 | (kill-buffer buffer))) | ||
338 | (delete-other-windows)) | ||
339 | 336 | ||
340 | (jd/leader-key-def | 337 | (jd/leader-key-def |
341 | "bk" '(kill-this-buffer :which-key "Kill buffer") | ||
342 | "bK" '(jd/kill-other-buffers :which-key "Kill other buffers")) | 338 | "bK" '(jd/kill-other-buffers :which-key "Kill other buffers")) |
339 | "bk" '(kill-current-buffer :which-key "Kill buffer") | ||
340 | "bB" '(ibuffer :which-key "Open ibuffer")) | ||
343 | 341 | ||
344 | #+end_src | 342 | #+end_src |
345 | 343 | ||