summary refs log tree commit diff
path: root/emacs.d/inits/10_defun.el
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacs.d/inits/10_defun.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/emacs.d/inits/10_defun.el b/emacs.d/inits/10_defun.el
new file mode 100644
index 0000000..233f771
--- /dev/null
+++ b/emacs.d/inits/10_defun.el
@@ -0,0 +1,7 @@
+(defun fcuny-terminal ()
+  "Switch to terminal. Launch if nonexistent."
+  (interactive)
+  (if (get-buffer "*ansi-term*")
+      (switch-to-buffer "*ansi-term*")
+    (ansi-term "/bin/bash"))
+  (get-buffer-process "*ansi-term*"))