Skip to content

Commit 99ebdce

Browse files
xiongtxbbatsov
authored andcommitted
Use 6-arg version of tramp-make-tramp-file-name for Emacs 26
See: https://travis-ci.org/clojure-emacs/cider/jobs/317868996#L811
1 parent 31325dc commit 99ebdce

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

cider-common.el

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,14 @@ Return the tramp prefix, or nil if BUFFER is local."
132132
(with-current-buffer buffer
133133
default-directory))))
134134
(when (tramp-tramp-file-p name)
135-
(let ((vec (tramp-dissect-file-name name)))
136-
(tramp-make-tramp-file-name (tramp-file-name-method vec)
137-
(tramp-file-name-user vec)
138-
(tramp-file-name-host vec)
139-
nil)))))
135+
(with-parsed-tramp-file-name name v
136+
;; `tramp-make-tramp-file-name' was changed to take 6 mandatory
137+
;; parameters in Emacs 26 instead of 4
138+
(if (version< emacs-version "26")
139+
(with-no-warnings
140+
(tramp-make-tramp-file-name v-method v-user v-host v-localname))
141+
(with-no-warnings
142+
(tramp-make-tramp-file-name v-method v-user v-domain v-host v-port v-localname)))))))
140143

141144
(defun cider--client-tramp-filename (name &optional buffer)
142145
"Return the tramp filename for path NAME relative to BUFFER.

0 commit comments

Comments
 (0)