Create command kill-this-buffer-delet-this-window

It kill the current buffer and deletes the window.
This commit is contained in:
Gergely Polonkai 2016-11-25 10:29:12 +01:00
parent 2d58576715
commit 67213f6da8
2 changed files with 8 additions and 0 deletions

View File

@ -1064,6 +1064,7 @@
("~" . toggle-char-case)
("|" . toggle-window-split)
("k" . gpolonkai/kill-this-buffer)
("M-c" . gpolonkai/kill-this-buffer-delete-this-window)
("M-k" . gpolonkai/undo-buffer-kill)
:map isearch-mode-map
("<C-return>" . isearch-exit-other-end)

View File

@ -54,3 +54,10 @@
"Quit WINDOW without killing it."
(interactive)
(quit-window nil window))
(defun gpolonkai/kill-this-buffer-delete-this-window ()
"Kill the buffer in the current window, and then try to delete
the current window."
(interactive)
(kill-this-buffer)
(delete-window))