From f01cf3f72d5aa35dfdbe2a7f59e93f370a0949c2 Mon Sep 17 00:00:00 2001 From: Ken Manheimer Date: Tue, 26 Jan 2016 14:18:10 -0500 Subject: [PATCH] multishell-start-shell-in-buffer - consolidate conditions better --- multishell.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/multishell.el b/multishell.el index c9b10502b..50035c048 100644 --- a/multishell.el +++ b/multishell.el @@ -558,16 +558,14 @@ and path nil if none resolved." (set-buffer buffer) (setq is-active (comint-check-proc buffer)) - (when (and path (file-remote-p path)) + (when (and path (not is-active)) - (when (and (derived-mode-p 'shell-mode) - (not is-active)) - ;; Returning to disconnected remote shell. Do some tidying: + (when (and (derived-mode-p 'shell-mode) (file-remote-p path)) + ;; Returning to disconnected remote shell - do some tidying: (tramp-cleanup-connection (tramp-dissect-file-name default-directory 'noexpand) - 'keep-debug 'keep-password))) + 'keep-debug 'keep-password)) - (when (and path (not is-active)) (message "Connecting to %s" path) (cd path)) -- 2.39.2