emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ssh-deploy d5315bf 080/173: Fix syntax notices and now


From: Stefan Monnier
Subject: [elpa] externals/ssh-deploy d5315bf 080/173: Fix syntax notices and now restores eshell buffer name
Date: Sat, 20 Oct 2018 10:36:34 -0400 (EDT)

branch: externals/ssh-deploy
commit d5315bfc0c46c53120c537b0aaa74189aff8bd9e
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>

    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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]