My Emacs configuration
git clone git://
Log | Files | Refs | LICENSE

commit 2c92e6a62e0d7064af5e9b27490e457af5e45e88
parent 51d34e97dd4d7a15df49f80de4f666823224d266
Author: Lukas Henkel <>
Date:   Mon, 27 Sep 2021 20:16:20 +0200

Emacs already asks if you're sure if the buffer has a file

Diffstat: | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ b/ @@ -138,7 +138,7 @@ There is a button in the toolbar to kill the current buffer, but there is no def (defun lh/kill-this-buffer () "Kills the current buffer, asks for confirmation if there are any unsaved changes" (interactive) - (when (if (buffer-modified-p) + (when (if (and (buffer-modified-p) (not (buffer-file-name))) (y-or-n-p "Buffer has unsaved changes, are you sure? ") t) (kill-this-buffer)))