summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-11-24 22:06:09 -0500
committerKyle Meyer <kyle@kyleam.com>2015-11-24 22:06:09 -0500
commit412754b52b4911db39898cd5ca1ea43f9614c535 (patch)
tree4e89d3e64372a96aa121caddaa77252b63917361
parentedc7700cfbaa872d23327ed4a6c0bdc38f0d2433 (diff)
downloademacs.d-412754b52b4911db39898cd5ca1ea43f9614c535.tar.gz
zsh-toggle-ansi-term-home: Add other-window prefix arg
-rw-r--r--lisp/init-external.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/init-external.el b/lisp/init-external.el
index b42956e..1e4f98e 100644
--- a/lisp/init-external.el
+++ b/lisp/init-external.el
@@ -64,11 +64,13 @@ DIRECTORY."
(lambda (b &rest _) (get-buffer b))))
(ansi-term "zsh" name)))))))
-(defun km/zsh-toggle-ansi-term-home ()
- (interactive)
+(defun km/zsh-toggle-ansi-term-home (&optional other-window)
+ (interactive "P")
(if (string= "*zsh*" (buffer-name))
(bury-buffer)
- (km/zsh-ansi-term "~/" "zsh")))
+ (let ((display-buffer-overriding-action
+ (and other-window '(nil (inhibit-same-window . t)))))
+ (km/zsh-ansi-term "~/" "zsh"))))
(defun km/zsh-ansi-term-other-window (&optional directory)
(interactive (km/zsh-ansi-term--args))