]> code.delx.au - gnu-emacs/commitdiff
Handle Bug#23186
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 3 Apr 2016 07:37:16 +0000 (09:37 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 3 Apr 2016 07:37:16 +0000 (09:37 +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 aa0ac022f03413074281a92a1ae96968836d27c3..79ff1bea4c2e2dfed9be807d3ed90b056da6535b 100644 (file)
@@ -4875,6 +4875,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 19dced6c2f32a4a81a6e1119c89467f2306b9f7a..26672d1fabb1732059f5aa74043f75b4124d02ad 100644 (file)
@@ -180,7 +180,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.
@@ -189,7 +189,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"