summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franckcuny@gmail.com>2016-02-12 15:38:47 -0800
committerFranck Cuny <franckcuny@gmail.com>2016-02-12 15:38:47 -0800
commit11cc177ca71badef945d0555ea16eaca52baff20 (patch)
tree856bc0a638ad7af06349943c3218aa49fc386b83
parent[emacs] some updates to the UI package. (diff)
downloademacs.d-11cc177ca71badef945d0555ea16eaca52baff20.tar.gz
[emacs] Add custom functions.
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*"))