summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-05-23 22:18:47 -0400
committerKyle Meyer <kyle@kyleam.com>2014-05-23 22:18:47 -0400
commit4a70dc91e69404cae3525fef564a18396d9fe22e (patch)
tree6a38429d26af191c8ec431aba12f99c1517e8684 /lisp
parent3144f6487318742c1cbd5eb707cc0b0a374035e3 (diff)
downloademacs.d-4a70dc91e69404cae3525fef564a18396d9fe22e.tar.gz
Add ansi-term to ctl-x-4-map
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-external.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/init-external.el b/lisp/init-external.el
index be8cdcd..43780c7 100644
--- a/lisp/init-external.el
+++ b/lisp/init-external.el
@@ -32,6 +32,13 @@ is non-nil, switch to the buffer."
(switch-to-buffer buffer-name)
(ansi-term "/bin/zsh" name))))
+(defun km/zsh-ansi-term-other-window (&optional new-buffer)
+ (interactive "P")
+ (let (buffer-name)
+ (save-window-excursion
+ (setq buffer-name (km/zsh-ansi-term new-buffer)))
+ (pop-to-buffer buffer-name)))
+
(defun km/display-compilation-other-window ()
(interactive)
(-if-let (comp-buffer (get-buffer "*compilation*"))
@@ -39,6 +46,8 @@ is non-nil, switch to the buffer."
(error "No compilation buffer")))
(define-key external-map "a" 'km/zsh-ansi-term)
+;; This overrides binding for `add-change-log-entry-other-window'.
+(define-key ctl-x-4-map "a" 'km/zsh-ansi-term-other-window)
(define-key external-map "t" 'km/open-external-terminal)
(define-key external-map "r" 'shell-command-on-region)
(define-key external-map "s" 'shell-command)