diff options
author | Tianxiang Xiong <tianxiang.xiong@gmail.com> | 2017-12-17 19:22:23 -0800 |
---|---|---|
committer | Bozhidar Batsov <bozhidar.batsov@gmail.com> | 2017-12-18 07:36:27 +0000 |
commit | 99ebdce0d80dd6895101cf4a99d0cc1cceec130f (patch) | |
tree | 8028f08b4657a2b426f6090e930352cda6957909 /cider-common.el | |
parent | 31325dc16ab9a9612fd7e53c30b208d92b9e2d5f (diff) |
Use 6-arg version of `tramp-make-tramp-file-name` for Emacs 26
See: https://travis-ci.org/clojure-emacs/cider/jobs/317868996#L811
Diffstat (limited to 'cider-common.el')
-rw-r--r-- | cider-common.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/cider-common.el b/cider-common.el index d0fedb3a..55a23798 100644 --- a/cider-common.el +++ b/cider-common.el @@ -132,11 +132,14 @@ Return the tramp prefix, or nil if BUFFER is local." (with-current-buffer buffer default-directory)))) (when (tramp-tramp-file-p name) - (let ((vec (tramp-dissect-file-name name))) - (tramp-make-tramp-file-name (tramp-file-name-method vec) - (tramp-file-name-user vec) - (tramp-file-name-host vec) - nil))))) + (with-parsed-tramp-file-name name v + ;; `tramp-make-tramp-file-name' was changed to take 6 mandatory + ;; parameters in Emacs 26 instead of 4 + (if (version< emacs-version "26") + (with-no-warnings + (tramp-make-tramp-file-name v-method v-user v-host v-localname)) + (with-no-warnings + (tramp-make-tramp-file-name v-method v-user v-domain v-host v-port v-localname))))))) (defun cider--client-tramp-filename (name &optional buffer) "Return the tramp filename for path NAME relative to BUFFER. |