mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Add modified-buffer confirmation to doom/kill-real-buffer
This commit is contained in:
@ -106,10 +106,14 @@ the buffer if it is being displayed in another window."
|
||||
(when arg (message "Already in scratch buffer")))
|
||||
(doom/previous-real-buffer))
|
||||
(let ((new-dir (doom/project-root)))
|
||||
(if (doom/popup-p (selected-window))
|
||||
(if (doom/popup-p)
|
||||
(doom/popup-close)
|
||||
(if (> (length (get-buffer-window-list (current-buffer) nil t)) 1)
|
||||
(bury-buffer)
|
||||
(when (and buffer-file-name (buffer-modified-p))
|
||||
(if (yes-or-no-p "Buffer is unsaved, save it?")
|
||||
(save-buffer)
|
||||
(set-buffer-modified-p nil)))
|
||||
(kill-this-buffer))
|
||||
(unless (doom/real-buffer-p (current-buffer))
|
||||
(doom/previous-real-buffer))
|
||||
|
Reference in New Issue
Block a user