Browse Source

[Fix #798] Prompt for confirmation in prelude-kill-other-buffers

custom
Bozhidar Batsov 11 years ago
parent
commit
dc861b7c8b
  1. 3
      core/prelude-core.el

3
core/prelude-core.el

@ -357,11 +357,12 @@ Repeated invocations toggle between the two most recently open buffers."
"Kill all buffers but the current one. "Kill all buffers but the current one.
Doesn't mess with special buffers." Doesn't mess with special buffers."
(interactive) (interactive)
(when (y-or-n-p "Are you sure you want to kill all buffers but the current one? ")
(-each (-each
(->> (buffer-list) (->> (buffer-list)
(-filter #'buffer-file-name) (-filter #'buffer-file-name)
(--remove (eql (current-buffer) it))) (--remove (eql (current-buffer) it)))
#'kill-buffer))
#'kill-buffer)))
(defun prelude-create-scratch-buffer () (defun prelude-create-scratch-buffer ()
"Create a new scratch buffer." "Create a new scratch buffer."

Loading…
Cancel
Save