Skip to content

Commit 8aad41a

Browse files
committed
Simplify some code
1 parent 1d9cce2 commit 8aad41a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cider.el

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,13 +1357,13 @@ canceled the action, signal quit."
13571357
(or (null host)
13581358
(equal host (plist-get ses-params :host))))))
13591359
(sesman-current-sessions 'CIDER '(project)))))
1360-
(when session
1361-
(when (y-or-n-p
1362-
(concat
1363-
"A session with the same connection parameters already exists (" (car session) "). "
1364-
"Do you want to connect a sibling REPL to it instead of creating a new session? "))
1365-
(let ((debug-on-quit nil))
1366-
(signal 'quit nil)))))
1360+
(when (and session
1361+
(y-or-n-p
1362+
(concat
1363+
"A session with the same connection parameters already exists (" (car session) "). "
1364+
"Do you want to connect a sibling REPL to it instead of creating a new session? ")))
1365+
(let ((debug-on-quit nil))
1366+
(signal 'quit nil))))
13671367
params)
13681368

13691369

0 commit comments

Comments
 (0)