aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2016-04-03 09:37:16 +0200
committerMichael Albinus2016-04-03 09:37:16 +0200
commit06ae23aa1202e547e65ff9f77882de4dd7f1c591 (patch)
treee22c40520b2112d64abcb6f6dc65347919ec19fe
parentb787d5501bad8036016d835faa2f90bb0904c038 (diff)
downloademacs-06ae23aa1202e547e65ff9f77882de4dd7f1c591.tar.gz
emacs-06ae23aa1202e547e65ff9f77882de4dd7f1c591.zip
Handle Bug#23186
* 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)
-rw-r--r--lisp/net/tramp-sh.el2
-rw-r--r--lisp/net/tramp.el4
2 files changed, 4 insertions, 2 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index aa0ac022f03..79ff1bea4c2 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4875,6 +4875,8 @@ connection if a previous connection has died for some reason."
4875 (setenv "HISTSIZE" "0")))) 4875 (setenv "HISTSIZE" "0"))))
4876 (setenv "PROMPT_COMMAND") 4876 (setenv "PROMPT_COMMAND")
4877 (setenv "PS1" tramp-initial-end-of-output) 4877 (setenv "PS1" tramp-initial-end-of-output)
4878 (unless (stringp tramp-encoding-shell)
4879 (tramp-error vec 'file-error "`tramp-encoding-shell' not set"))
4878 (let* ((target-alist (tramp-compute-multi-hops vec)) 4880 (let* ((target-alist (tramp-compute-multi-hops vec))
4879 ;; We will apply `tramp-ssh-controlmaster-options' 4881 ;; We will apply `tramp-ssh-controlmaster-options'
4880 ;; only for the first hop. 4882 ;; only for the first hop.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 19dced6c2f3..26672d1fabb 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -180,7 +180,7 @@ use for the remote host."
180 :type '(file :must-match t)) 180 :type '(file :must-match t))
181 181
182(defcustom tramp-encoding-command-switch 182(defcustom tramp-encoding-command-switch
183 (if (string-match "cmd\\.exe" tramp-encoding-shell) 183 (if (string-match "cmd\\.exe" (or tramp-encoding-shell ""))
184 "/c" 184 "/c"
185 "-c") 185 "-c")
186 "Use this switch together with `tramp-encoding-shell' for local commands. 186 "Use this switch together with `tramp-encoding-shell' for local commands.
@@ -189,7 +189,7 @@ See the variable `tramp-encoding-shell' for more information."
189 :type 'string) 189 :type 'string)
190 190
191(defcustom tramp-encoding-command-interactive 191(defcustom tramp-encoding-command-interactive
192 (unless (string-match "cmd\\.exe" tramp-encoding-shell) "-i") 192 (unless (string-match "cmd\\.exe" (or tramp-encoding-shell "")) "-i")
193 "Use this switch together with `tramp-encoding-shell' for interactive shells. 193 "Use this switch together with `tramp-encoding-shell' for interactive shells.
194See the variable `tramp-encoding-shell' for more information." 194See the variable `tramp-encoding-shell' for more information."
195 :version "24.1" 195 :version "24.1"