File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 24
24
25
25
(require 'racket-mode nil t )
26
26
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" )
29
29
30
30
(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))
32
33
33
34
(defun lispy--eval-racket (str )
35
+ " Evaluate STR in the context of the current racket repl session."
34
36
(let* ((awaiting 'RACKET-REPL-AWAITING )
35
37
(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)))
40
42
(with-timeout (1
41
43
(error " racket-command process timeout " ))
42
44
(while (eq response awaiting)
43
45
(accept-process-output nil 0.001 ))
44
- ( substring response 1 -2 ) )))
46
+ response)))
45
47
46
48
(defun lispy-eval-racket ()
47
49
(lispy--eval-racket (lispy--string-dwim)))
You can’t perform that action at this time.
0 commit comments