Use (delete-other-windows) in kill defuns
This commit is contained in:
parent
b9d3339db4
commit
a58f4246ba
1 changed files with 2 additions and 0 deletions
|
@ -60,12 +60,14 @@
|
||||||
(defun my/kill-all-buffers ()
|
(defun my/kill-all-buffers ()
|
||||||
"Kill all buffers, even the one you're in"
|
"Kill all buffers, even the one you're in"
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(delete-other-windows)
|
||||||
(mapc 'kill-buffer (buffer-list))
|
(mapc 'kill-buffer (buffer-list))
|
||||||
(message "All buffers killed"))
|
(message "All buffers killed"))
|
||||||
|
|
||||||
(defun my/kill-other-buffers ()
|
(defun my/kill-other-buffers ()
|
||||||
"Kill all buffers but the one you're in"
|
"Kill all buffers but the one you're in"
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(delete-other-windows)
|
||||||
(mapc 'kill-buffer (cdr (buffer-list (current-buffer))))
|
(mapc 'kill-buffer (cdr (buffer-list (current-buffer))))
|
||||||
(message "All other buffers killed"))
|
(message "All other buffers killed"))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue