summaryrefslogtreecommitdiffstats
path: root/Emacs.org
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2022-08-13 16:26:16 +0200
committerjdlugosz963 <jdlugosz963@gmail.com>2022-08-13 16:26:16 +0200
commit72c21307204f4dc6e23d667876976929ed79de03 (patch)
treec60a6e4cce02671d63165e5deb323a4f1c9b81f7 /Emacs.org
parent4a00508f8a09c6fb3b284627b65624a2f9a46916 (diff)
downloaddotfiles-72c21307204f4dc6e23d667876976929ed79de03.tar.gz
dotfiles-72c21307204f4dc6e23d667876976929ed79de03.zip
Emacs: Add kill-other-buffers function
Diffstat (limited to 'Emacs.org')
-rw-r--r--Emacs.org10
1 files changed, 9 insertions, 1 deletions
diff --git a/Emacs.org b/Emacs.org
index 8605870..a6d5867 100644
--- a/Emacs.org
+++ b/Emacs.org
@@ -274,8 +274,16 @@
274 274
275#+begin_src emacs-lisp 275#+begin_src emacs-lisp
276 276
277 (defun jd/kill-other-buffers ()
278 (interactive)
279 (dolist (buffer (buffer-list))
280 (when (not (equal (current-buffer) buffer))
281 (kill-buffer buffer)))
282 (delete-other-windows))
283
277 (jd/leader-key-def 284 (jd/leader-key-def
278 "bk" '(kill-this-buffer :which-key "Buffer kill")) 285 "bk" '(kill-this-buffer :which-key "Kill buffer")
286 "bK" '(jd/kill-other-buffers :which-key "Kill other buffers"))
279 287
280#+end_src 288#+end_src
281 289