emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 1b33cd8: Fix Bug#23186, again


From: Michael Albinus
Subject: [Emacs-diffs] master 1b33cd8: Fix Bug#23186, again
Date: Sun, 03 Apr 2016 15:54:41 +0000

branch: master
commit 1b33cd8e7e5c747afde29e10b5fe192c5a37b67a
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Fix Bug#23186, again
    
    * lisp/net/tramp.el (tramp-encoding-shell)
    (tramp-encoding-command-switch)
    (tramp-encoding-command-interactive): Check for
    `w32-shell-name'.  (Bug#23186)
---
 lisp/net/tramp.el |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index fc194fa..4edca5a 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -120,8 +120,8 @@ This setting has precedence over 
`auto-save-file-name-transforms'."
                 (directory :tag "Auto save directory name")))
 
 (defcustom tramp-encoding-shell
-  (if (memq system-type '(windows-nt))
-      (getenv "COMSPEC")
+  (if (boundp 'w32-shell-name)
+      (symbol-value 'w32-shell-name)
     "/bin/sh")
   "Use this program for encoding and decoding commands on the local host.
 This shell is used to execute the encoding and decoding command on the
@@ -145,17 +145,14 @@ use for the remote host."
   :group 'tramp
   :type '(file :must-match t))
 
-(defcustom tramp-encoding-command-switch
-  (if (string-match "cmd\\.exe" (or tramp-encoding-shell ""))
-      "/c"
-    "-c")
+(defcustom tramp-encoding-command-switch (if (boundp 'w32-shell-name) "/c" 
"-c")
   "Use this switch together with `tramp-encoding-shell' for local commands.
 See the variable `tramp-encoding-shell' for more information."
   :group 'tramp
   :type 'string)
 
 (defcustom tramp-encoding-command-interactive
-  (unless (string-match "cmd\\.exe" (or tramp-encoding-shell "")) "-i")
+  (unless (boundp 'w32-shell-name) "-i")
   "Use this switch together with `tramp-encoding-shell' for interactive shells.
 See the variable `tramp-encoding-shell' for more information."
   :version "24.1"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]