Browse Source

added a helper function prelude-kill-other-buffers, that kills all

buffers, but the current one
custom
Bozhidar Batsov 14 years ago
parent
commit
70210075fa
  1. 7
      modules/prelude-core.el
  2. 3
      modules/prelude-global-keybindings.el

7
modules/prelude-core.el

@ -351,5 +351,12 @@ there's a region, all lines that region covers will be duplicated."
(set-window-start w2 s1)))
(other-window 1))
(defun prelude-kill-other-buffers ()
"Kill all buffers but the current one"
(interactive)
(dolist (buffer (buffer-list))
(unless (eql buffer (current-buffer))
(kill-buffer buffer))))
(provide 'prelude-core)
;;; prelude-core.el ends here

3
modules/prelude-global-keybindings.el

@ -115,6 +115,9 @@
;; open an ansi-term buffer
(global-set-key (kbd "C-x t") 'prelude-visit-term-buffer)
;; kill other buffers
(global-set-key (kbd "C-c k o") 'prelude-kill-other-buffers)
;; search with google
(global-set-key (kbd "C-c g") 'prelude-google)

Loading…
Cancel
Save