diff options
author | Juergen Hoetzel <juergen@archlinux.org> | 2015-09-25 01:42:10 +0200 |
---|---|---|
committer | Juergen Hoetzel <juergen@archlinux.org> | 2015-09-28 08:17:25 +0200 |
commit | 589f4557e54e9bf1c55c0f049a4abf230b9eac7b (patch) | |
tree | 51e0f38c227f2104c2349c62bfb82e5b0cee8642 /cider-common.el | |
parent | 386befaf929f7a608c72810134682201bb06eaf5 (diff) |
[#735] Use built-in cygwin functions
Use `cygwin-convert-file-name-to-windows' and
`cygwin-convert-file-name-from-windows' instead of executing external
"cygpath" commands.
Diffstat (limited to 'cider-common.el')
-rw-r--r-- | cider-common.el | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cider-common.el b/cider-common.el index a12a57a7..2073c065 100644 --- a/cider-common.el +++ b/cider-common.el @@ -127,14 +127,10 @@ otherwise, nil." name)) (defvar cider-from-nrepl-filename-function - (if (eq system-type 'cygwin) - (lambda (resource) - (let ((fixed-resource (replace-regexp-in-string "^/" "" resource))) - (replace-regexp-in-string - "\n" - "" - (shell-command-to-string (format "cygpath --unix '%s'" fixed-resource))))) - #'identity) + (with-no-warnings + (if (eq system-type 'cygwin) + #'cygwin-convert-file-name-from-windows + #'identity)) "Function to translate nREPL namestrings to Emacs filenames.") (defcustom cider-prefer-local-resources nil |