Don't prompt to save for non-file-visiting buffers on kill-this-buffer

This commit is contained in:
Henrik Lissner 2018-03-24 17:04:22 -04:00
parent e7331e9026
commit 57065c4a71
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -576,7 +576,8 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
((eq buf (doom-fallback-buffer)) ((eq buf (doom-fallback-buffer))
(message "Can't kill the fallback buffer.")) (message "Can't kill the fallback buffer."))
((doom-real-buffer-p buf) ((doom-real-buffer-p buf)
(if (and (buffer-modified-p buf) (if (and buffer-file-name
(buffer-modified-p buf)
(not (y-or-n-p "Buffer %s is modified; kill anyway?"))) (not (y-or-n-p "Buffer %s is modified; kill anyway?")))
(message "Aborted") (message "Aborted")
(set-buffer-modified-p nil) (set-buffer-modified-p nil)