branch: elpa/powershell
commit 740608e6525b368a4252d2b2ded3a10ed826a8f9
Author: Juergen Hoetzel <[email protected]>
Commit: Juergen Hoetzel <[email protected]>
Support Cygwin
Cygwin requires Unix filenames.
Also use dynamic scoping insead of temporary changing the global value
of `explicit-shell-file-name'.
---
powershell.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/powershell.el b/powershell.el
index 854c925d125..bdd0a3afedb 100644
--- a/powershell.el
+++ b/powershell.el
@@ -995,13 +995,13 @@ See the help for `shell' for more details. \(Type
(setq buffer (get-buffer-create (or buffer "*PowerShell*")))
(powershell-log 1 "powershell starting up...in buffer %s" (buffer-name
buffer))
- (let ((tmp-shellfile explicit-shell-file-name))
+ (let ((explicit-shell-file-name (if (eq system-type 'cygwin)
+ (cygwin-convert-file-name-from-windows
powershell-location-of-exe)
+ powershell-location-of-exe)))
;; set arguments for the powershell exe.
;; Does this need to be tunable?
- (setq explicit-shell-file-name powershell-location-of-exe)
- (shell buffer)
- (setq explicit-shell-file-name tmp-shellfile))
+ (shell buffer))
;; (powershell--get-max-window-width "*PowerShell*")
;; (powershell-invoke-command-silently (get-buffer-process "*csdeshell*")