summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStas Boukarev <stassats@gmail.com>2024-09-28 14:01:56 +0300
committerStas Boukarev <stassats@gmail.com>2024-09-28 14:01:56 +0300
commit941657d07a12fcd0aa1db5a1a6376a6b8c3ae71a (patch)
tree9b3793d61580290f63dee0b00287cbfe54689df5
parent6818b5bd3c8d6df18375a0d30b0bc9c8fa69bdca (diff)
Fix slime-connect.
-rw-r--r--slime.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/slime.el b/slime.el
index b00bdba5..cfc83e53 100644
--- a/slime.el
+++ b/slime.el
@@ -1875,8 +1875,9 @@ This is automatically synchronized from Lisp.")
(setf (slime-machine-instance) instance))
(cl-destructuring-bind (&key coding-systems) encoding
(setf (slime-connection-coding-systems) coding-systems)))
- (let ((args (let ((p (slime-inferior-process)))
- (if p (slime-inferior-lisp-args p)))))
+ (let* ((process (slime-inferior-process))
+ (args (and process
+ (slime-inferior-lisp-args process))))
(let ((name (plist-get args ':name)))
(when name
(unless (string= (slime-lisp-implementation-name) name)
@@ -1884,8 +1885,9 @@ This is automatically synchronized from Lisp.")
(slime-generate-connection-name (symbol-name name))))))
(slime-load-contribs)
(run-hooks 'slime-connected-hook)
- (with-current-buffer (process-buffer (slime-inferior-process))
- (setq slime-inferior-lisp-connected connection))
+ (when process
+ (with-current-buffer (process-buffer process)
+ (setq slime-inferior-lisp-connected connection)))
(let ((fun (plist-get args ':init-function)))
(when fun (funcall fun))))
(message "Connected. %s" (slime-random-words-of-encouragement))))