Skip to content

Commit 38a7df4

Browse files
kiranandcodeabo-abo
authored andcommitted
Updates le-racket to changes in racket-mode api
Fixes #561
1 parent a361553 commit 38a7df4

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

le-racket.el

+10-8
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,26 @@
2424

2525
(require 'racket-mode nil t)
2626

27-
(declare-function racket-lispy-visit-symbol-definition "ext:racket-edit")
28-
(declare-function racket--cmd/async "exit:racket-repl")
27+
(declare-function racket--cmd/async "ext:racket-repl")
28+
(declare-function racket--repl-session-id "ext:racket-repl")
2929

3030
(defun lispy-goto-symbol-racket (symbol)
31-
(racket-lispy-visit-symbol-definition symbol))
31+
"Go to the definition of the SYMBOL."
32+
(xref-find-definitions symbol))
3233

3334
(defun lispy--eval-racket (str)
35+
"Evaluate STR in the context of the current racket repl session."
3436
(let* ((awaiting 'RACKET-REPL-AWAITING)
3537
(response awaiting))
36-
(racket--cmd/async
37-
`(eval ,str)
38-
(lambda (v)
39-
(setq response v)))
38+
(racket--cmd/async (racket--repl-session-id)
39+
`(eval ,str)
40+
(lambda (v)
41+
(setq response v)))
4042
(with-timeout (1
4143
(error "racket-command process timeout"))
4244
(while (eq response awaiting)
4345
(accept-process-output nil 0.001))
44-
(substring response 1 -2))))
46+
response)))
4547

4648
(defun lispy-eval-racket ()
4749
(lispy--eval-racket (lispy--string-dwim)))

0 commit comments

Comments
 (0)