]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Bug#23186
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 3 Apr 2016 08:18:40 +0000 (10:18 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 3 Apr 2016 08:18:40 +0000 (10:18 +0200)
* lisp/net/tramp.el (tramp-encoding-command-switch)
(tramp-encoding-command-interactive):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
`tramp-encoding-shell' could be nil.  (Bug#23186)

lisp/net/tramp-sh.el
lisp/net/tramp.el

index dbaa73f1f62962ee167bcb236e43d1ad874d1816..2667aaff0dbacad214ec416b0cff6e6fb18fe190 100644 (file)
@@ -4783,6 +4783,8 @@ connection if a previous connection has died for some reason."
                      (setenv "HISTSIZE" "0"))))
              (setenv "PROMPT_COMMAND")
              (setenv "PS1" tramp-initial-end-of-output)
+              (unless (stringp tramp-encoding-shell)
+                (tramp-error vec 'file-error "`tramp-encoding-shell' not set"))
              (let* ((target-alist (tramp-compute-multi-hops vec))
                     ;; We will apply `tramp-ssh-controlmaster-options'
                     ;; only for the first hop.
index f03ec554b684e01c7909a99bf05b7d702fa751b7..fc194fa1ecd2670d7e15185615e18c51c1fff6e7 100644 (file)
@@ -146,7 +146,7 @@ use for the remote host."
   :type '(file :must-match t))
 
 (defcustom tramp-encoding-command-switch
-  (if (string-match "cmd\\.exe" tramp-encoding-shell)
+  (if (string-match "cmd\\.exe" (or tramp-encoding-shell ""))
       "/c"
     "-c")
   "Use this switch together with `tramp-encoding-shell' for local commands.
@@ -155,7 +155,7 @@ See the variable `tramp-encoding-shell' for more information."
   :type 'string)
 
 (defcustom tramp-encoding-command-interactive
-  (unless (string-match "cmd\\.exe" tramp-encoding-shell) "-i")
+  (unless (string-match "cmd\\.exe" (or tramp-encoding-shell "")) "-i")
   "Use this switch together with `tramp-encoding-shell' for interactive shells.
 See the variable `tramp-encoding-shell' for more information."
   :version "24.1"