summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-06-25 02:01:18 -0400
committerKyle Meyer <kyle@kyleam.com>2016-06-25 02:01:18 -0400
commitdc3a960e9bba5722a5d5dd3fa4bdf26846cc89b9 (patch)
treeba5cdcb3b59bff2f83e0500b7fd056c40486e19e /lisp
parentbe8c965915d780dba441334bf231c78e566a6d4d (diff)
downloademacs.d-dc3a960e9bba5722a5d5dd3fa4bdf26846cc89b9.tar.gz
zsh-ansi-term: Don't assume ansi-term returns the buffer
... because it no longer does.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/km-shell.el14
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/km-shell.el b/lisp/km-shell.el
index fe9d25d..9b656a8 100644
--- a/lisp/km-shell.el
+++ b/lisp/km-shell.el
@@ -58,14 +58,12 @@ DIRECTORY."
(name (or name (concat "zsh: " dir)))
(full-name (concat "*" name "*"))
(default-directory dir))
- (pop-to-buffer-same-window
- (cond
- ((and (not (string= (km/zsh-ansi-term-directory) dir))
- (get-buffer full-name)))
- (t
- (cl-letf (((symbol-function 'switch-to-buffer)
- (lambda (b &rest _) (get-buffer b))))
- (ansi-term "zsh" name)))))
+ (unless (and (not (string= (km/zsh-ansi-term-directory) dir))
+ (get-buffer full-name))
+ (cl-letf (((symbol-function 'switch-to-buffer)
+ (lambda (&rest _) nil)))
+ (ansi-term "zsh" name)))
+ (pop-to-buffer-same-window full-name)
(comint-goto-process-mark)))
;;;###autoload