Refactor prelude-visit-term-buffer

This commit is contained in:
Bozhidar Batsov 2013-04-29 17:12:40 +03:00
parent 37aa47f427
commit f4d71fea83

View file

@ -54,12 +54,9 @@
(defun prelude-visit-term-buffer () (defun prelude-visit-term-buffer ()
"Create or visit a terminal buffer." "Create or visit a terminal buffer."
(interactive) (interactive)
(if (not (get-buffer "*ansi-term*")) (prelude-start-or-switch-to (lambda ()
(progn
(split-window-sensibly (selected-window))
(other-window 1)
(ansi-term (getenv "SHELL"))) (ansi-term (getenv "SHELL")))
(switch-to-buffer-other-window "*ansi-term*"))) "*ansi-term*"))
(defun prelude-google () (defun prelude-google ()
"Googles a query or region if any." "Googles a query or region if any."