2018-07-29 10:50:17 -03:00
|
|
|
;;; lang/racket/autoload.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;;;###autoload
|
2019-10-07 14:08:58 -04:00
|
|
|
(defun +racket/open-repl ()
|
2018-07-29 10:50:17 -03:00
|
|
|
"Open the Racket REPL."
|
|
|
|
(interactive)
|
|
|
|
(pop-to-buffer
|
|
|
|
(or (get-buffer "*Racket REPL*")
|
|
|
|
(progn (racket-run-and-switch-to-repl)
|
|
|
|
(let ((buf (get-buffer "*Racket REPL*")))
|
|
|
|
(bury-buffer buf)
|
|
|
|
buf)))))
|
2020-06-13 00:03:11 -07:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +racket-lookup-documentation (thing)
|
2020-07-26 15:08:28 -04:00
|
|
|
"A `+lookup/documentation' handler for `racket-mode' and `racket-xp-mode'."
|
2020-06-13 00:03:11 -07:00
|
|
|
(let ((buf (if racket-xp-mode
|
|
|
|
(racket-xp-describe thing)
|
|
|
|
(racket-repl-describe thing))))
|
|
|
|
(when buf
|
|
|
|
(pop-to-buffer buf)
|
|
|
|
t)))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +racket-lookup-definition (_thing)
|
2020-07-26 15:08:28 -04:00
|
|
|
"A `+lookup/definition' handler for `racket-mode' and `racket-xp-mode'."
|
|
|
|
(call-interactively
|
|
|
|
(if racket-xp-mode
|
|
|
|
#'racket-xp-visit-definition
|
|
|
|
#'racket-repl-visit-definition)))
|