File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1443,14 +1443,21 @@ server buffer, in which case a new session for that server is created."
1443
1443
(plist-put :session-name ses-name)
1444
1444
(plist-put :repl-type 'cljs )))))
1445
1445
1446
+ (defvar-local cider-connect-default-params nil
1447
+ " Default plist of params to pass to `cider-connect' .
1448
+ Recognized keys are :host, :port and :project-dir." )
1449
+
1446
1450
;;;### autoload
1447
1451
(defun cider-connect-clj (&optional params )
1448
1452
" Initialize a Clojure connection to an nREPL server.
1449
- PARAMS is a plist optionally containing :host, :port and :project-dir. On
1450
- prefix argument, prompt for all the parameters."
1453
+ PARAMS is a plist optionally containing :host, :port and :project-dir.
1454
+ If nil, use the default parameters in `cider-connect-default-params' .
1455
+ When called interactively with a prefix argument, prompt for all the
1456
+ parameters."
1451
1457
(interactive " P" )
1452
1458
(cider-nrepl-connect
1453
- (thread-first params
1459
+ ; ; Make sure to copy the list, as the following steps will mutate it
1460
+ (thread-first (or params (copy-sequence cider-connect-default-params))
1454
1461
(cider--update-project-dir)
1455
1462
(cider--update-host-port)
1456
1463
(cider--check-existing-session)
You can’t perform that action at this time.
0 commit comments