summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.emacs.d/site-lisp/oni.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/.emacs.d/site-lisp/oni.el b/.emacs.d/site-lisp/oni.el
index c483278..2dee8f6 100644
--- a/.emacs.d/site-lisp/oni.el
+++ b/.emacs.d/site-lisp/oni.el
@@ -409,6 +409,14 @@ When dealing with braces, add another line and indent that too."
fill-column 72)
(fci-mode))
+(defun oni:raise-ansi-term (arg)
+ "Create or show an `ansi-term' buffer."
+ (interactive "P")
+ (let ((buffer (get-buffer "*ansi-term*")))
+ (if (and buffer (not arg))
+ (switch-to-buffer buffer)
+ (call-interactively 'ansi-term))))
+
(defun oni:raise-eshell ()
"Start or switch back to `eshell'.
Also change directories to current working directory."