branch: externals/ssh-deploy
commit d5315bfc0c46c53120c537b0aaa74189aff8bd9e
Author: Christian Johansson <[email protected]>
Commit: Christian Johansson <[email protected]>
Fix syntax notices and now restores eshell buffer name
---
ssh-deploy.el | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/ssh-deploy.el b/ssh-deploy.el
index a0b209e..0a89d03 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -4,7 +4,7 @@
;; Maintainer: Christian Johansson <github.com/cjohansson>
;; Created: 5 Jul 2016
;; Modified: 4 Sep 2017
-;; Version: 1.62
+;; Version: 1.63
;; Keywords: tools, convenience
;; URL: https://github.com/cjohansson/emacs-ssh-deploy
@@ -536,15 +536,21 @@
(let ((command (concat "/" (alist-get 'protocol remote-root) ":"
(alist-get 'username remote-root) "@" (alist-get 'server remote-root) ":"
(alist-get 'path remote-root))))
(let ((old-directory default-directory))
(require 'eshell)
- (message "Opening eshell on '%s'.." command)
- (defvar eshell-buffer-name)
- (setq eshell-buffer-name (alist-get 'server remote-root))
- (let ((eshell-buffer (eshell)))
- (goto-char (point-max))
- (eshell-kill-input)
- (insert (concat "cd " command))
- (eshell-send-input)
- (goto-char (point-max)))))))))
+ (if (and (fboundp 'eshell-kill-input)
+ (fboundp 'eshell-send-input))
+ (progn
+ (message "Opening eshell on '%s'.." command)
+ (defvar eshell-buffer-name)
+ (let ((old-eshell-buffer-name eshell-buffer-name))
+ (setq eshell-buffer-name (alist-get 'server remote-root))
+ (let ((eshell-buffer (eshell)))
+ (goto-char (point-max))
+ (eshell-kill-input)
+ (insert (concat "cd " command))
+ (eshell-send-input)
+ (goto-char (point-max))
+ (setq eshell-buffer-name old-eshell-buffer-name))))
+ (message "Missing required eshell functions"))))))))
;;;### autoload
(defun ssh-deploy-remote-terminal (remote-host-string)