Skip to content

Commit

Permalink
[Fix bbatsov#798] Prompt for confirmation in prelude-kill-other-buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
bbatsov authored and murtaza52 committed Feb 16, 2015
1 parent 991e1c2 commit 70206d3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions core/prelude-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,12 @@ Repeated invocations toggle between the two most recently open buffers."
"Kill all buffers but the current one.
Doesn't mess with special buffers."
(interactive)
(-each
(->> (buffer-list)
(-filter #'buffer-file-name)
(--remove (eql (current-buffer) it)))
#'kill-buffer))
(when (y-or-n-p "Are you sure you want to kill all buffers but the current one? ")
(-each
(->> (buffer-list)
(-filter #'buffer-file-name)
(--remove (eql (current-buffer) it)))
#'kill-buffer)))

(defun prelude-create-scratch-buffer ()
"Create a new scratch buffer."
Expand Down

0 comments on commit 70206d3

Please sign in to comment.