Skip to content

Commit 7e3ae96

Browse files
vspinubbatsov
authored andcommitted
[Fix #2418] Don't overwrite explicitly supplied params in connect-sibling-xyz
1 parent 8bf420f commit 7e3ae96

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

cider-connection.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ entire session."
347347
(let* ((repl (or repl
348348
(sesman-browser-get 'object)
349349
(cider-current-repl nil 'ensure)))
350-
(params (thread-first (cider--gather-connect-params nil repl)
350+
(params (thread-first ()
351+
(cider--gather-connect-params repl)
351352
(plist-put :session-name (sesman-session-name-for-object 'CIDER repl))
352353
(plist-put :repl-buffer repl))))
353354
(cider--close-connection repl 'no-kill)

cider.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -991,11 +991,12 @@ server is created."
991991
(interactive "P")
992992
(cider-nrepl-connect
993993
(let* ((other-repl (or other-repl (cider-current-repl nil 'ensure)))
994+
(other-params (cider--gather-connect-params nil other-repl))
994995
(ses-name (unless (nrepl-server-p other-repl)
995996
(sesman-session-name-for-object 'CIDER other-repl))))
996997
(thread-first params
997998
(cider--update-do-prompt)
998-
(cider--gather-connect-params other-repl)
999+
(append other-params)
9991000
(plist-put :repl-init-function nil)
10001001
(plist-put :repl-type "clj")
10011002
(plist-put :session-name ses-name)))))
@@ -1009,12 +1010,13 @@ OTHER-REPL defaults to `cider-current-repl' but in programs can also be a
10091010
server buffer, in which case a new session for that server is created."
10101011
(interactive "P")
10111012
(let* ((other-repl (or other-repl (cider-current-repl nil 'ensure)))
1013+
(other-params (cider--gather-connect-params nil other-repl))
10121014
(ses-name (unless (nrepl-server-p other-repl)
10131015
(sesman-session-name-for-object 'CIDER other-repl))))
10141016
(cider-nrepl-connect
10151017
(thread-first params
10161018
(cider--update-do-prompt)
1017-
(cider--gather-connect-params other-repl)
1019+
(append other-params)
10181020
(cider--update-cljs-type)
10191021
(cider--update-cljs-init-function)
10201022
(plist-put :session-name ses-name)

0 commit comments

Comments
 (0)