Improve the behaviour of the visit-term command

This commit is contained in:
Bozhidar Batsov 2013-01-30 18:04:51 +02:00
parent cab4b80766
commit 71416f0008

View file

@ -52,8 +52,11 @@ file of a buffer in an external program."
(defun prelude-visit-term-buffer ()
(interactive)
(if (not (get-buffer "*ansi-term*"))
(ansi-term (getenv "SHELL"))
(switch-to-buffer "*ansi-term*")))
(progn
(split-window-sensibly (selected-window))
(other-window 1)
(ansi-term (getenv "SHELL")))
(switch-to-buffer-other-window "*ansi-term*")))
(defun prelude-google ()
"Googles a query or region if any."