]> code.delx.au - gnu-emacs/blobdiff - lisp/net/tramp.el
Fix Bug#23186
[gnu-emacs] / lisp / net / tramp.el
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"