*** /tmp/ediffWyfTux	2019-03-22 15:09:52.065151959 +0100
--- /home/albinus/src/emacs/lisp/shell.el	2019-03-22 15:09:35.080867417 +0100
***************
*** 721,729 ****
                   (current-buffer)))

    (with-current-buffer buffer
!     (when (file-remote-p default-directory)
!       ;; On remote hosts, the local `shell-file-name' might be useless.
!       (with-connection-local-variables
         (if (and (called-interactively-p 'any)
                  (null explicit-shell-file-name)
                  (null (getenv "ESHELL")))
--- 721,729 ----
                   (current-buffer)))

    (with-current-buffer buffer
!     (with-connection-local-variables
!      ;; On remote hosts, the local `shell-file-name' might be useless.
!      (when (file-remote-p default-directory)
         (if (and (called-interactively-p 'any)
                  (null explicit-shell-file-name)
                  (null (getenv "ESHELL")))
***************
*** 732,757 ****
  		 (expand-file-name
                    (read-file-name
                     "Remote shell path: " default-directory shell-file-name
!                    t shell-file-name))))))))

!   ;; The buffer's window must be correctly set when we call comint
!   ;; (so that comint sets the COLUMNS env var properly).
!   (pop-to-buffer buffer)
!   ;; Rain or shine, BUFFER must be current by now.
!   (unless (comint-check-proc buffer)
!     (let* ((prog (or explicit-shell-file-name
!                      (getenv "ESHELL") shell-file-name))
!            (name (file-name-nondirectory prog))
!            (startfile (concat "~/.emacs_" name))
!            (xargs-name (intern-soft (concat "explicit-" name "-args"))))
!       (unless (file-exists-p startfile)
!         (setq startfile (concat user-emacs-directory "init_" name ".sh")))
!       (apply #'make-comint-in-buffer "shell" buffer prog
!              (if (file-exists-p startfile) startfile)
!              (if (and xargs-name (boundp xargs-name))
!                  (symbol-value xargs-name)
!                '("-i")))
!       (shell-mode)))
    buffer)

  ;;; Directory tracking
--- 732,757 ----
  		 (expand-file-name
                    (read-file-name
                     "Remote shell path: " default-directory shell-file-name
!                    t shell-file-name))))))

!      ;; The buffer's window must be correctly set when we call comint
!      ;; (so that comint sets the COLUMNS env var properly).
!      (pop-to-buffer buffer)
!      ;; Rain or shine, BUFFER must be current by now.
!      (unless (comint-check-proc buffer)
!        (let* ((prog (or explicit-shell-file-name
!                         (getenv "ESHELL") shell-file-name))
!               (name (file-name-nondirectory prog))
!               (startfile (concat "~/.emacs_" name))
!               (xargs-name (intern-soft (concat "explicit-" name "-args"))))
!          (unless (file-exists-p startfile)
!            (setq startfile (concat user-emacs-directory "init_" name ".sh")))
!          (apply #'make-comint-in-buffer "shell" buffer prog
!                 (if (file-exists-p startfile) startfile)
!                 (if (and xargs-name (boundp xargs-name))
!                     (symbol-value xargs-name)
!                   '("-i")))
!          (shell-mode)))))
    buffer)

  ;;; Directory tracking
