aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2025-05-04 19:29:20 +0200
committerOscar Najera <hi@oscarnajera.com>2025-05-04 19:29:20 +0200
commit89cf7f454961d34a3e6731d8bf1505b11bef365c (patch)
tree3f73cd51633a3f5005ff7a7c4d7942b31c6efbc8
parente56d89ce138b874e1c12a701ceb5e168045a3406 (diff)
downloadtrident-mode.el-89cf7f454961d34a3e6731d8bf1505b11bef365c.tar.gz
trident-mode.el-89cf7f454961d34a3e6731d8bf1505b11bef365c.tar.bz2
trident-mode.el-89cf7f454961d34a3e6731d8bf1505b11bef365c.zip
-rw-r--r--trident-mode.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/trident-mode.el b/trident-mode.el
index 033cf90..90e5280 100644
--- a/trident-mode.el
+++ b/trident-mode.el
@@ -220,7 +220,7 @@ discarded; it must work through side effects alone.
See also `trident-with-expansion'."
(let ((string (trident-wrap-in-ps-form string)))
- (sly-eval-async `(swank:eval-and-grab-output ,string)
+ (sly-eval-async `(slynk:eval-and-grab-output ,string)
#'(lambda (result)
(funcall fn (read (cadr result))))
(sly-current-package))))
@@ -239,7 +239,7 @@ See also `trident-call-with-expansion'."
(string (cadr name-and-string))
(rv (make-symbol "rv")))
`(sly-eval-async
- `(swank:eval-and-grab-output ,(trident-wrap-in-ps-form ,string))
+ `(slynk:eval-and-grab-output ,(trident-wrap-in-ps-form ,string))
#'(lambda (,rv)
(let ((,name (read (cadr ,rv))))
,@body))
@@ -263,8 +263,7 @@ buffer's major mode is determined by the variable
(trident-expansion-mode 1)
(font-lock-ensure)
(goto-char (point-min))
- (setq buffer-read-only t)
- (pop-to-buffer (current-buffer)))))
+ (setq buffer-read-only t))))
(defun trident-compile-buffer-to-file ()
"Compile the current buffer and write the result.
@@ -314,14 +313,14 @@ BEG and END are character positions delimiting active region."
(interactive)
(trident-expand-region (point-min) (point-max)))
-(defun trident-expand-dwim ()
+(defun trident-expand-dwim (beg end)
"Display the expansion of the active region or toplevel form.
If the region is active this is equivalent to invoking
`trident-expand-region', otherwise it's equivalent to
`trident-expand-defun'."
- (interactive)
+ (interactive "r")
(if (region-active-p)
- (trident-expand-region (region-beginning) (region-end))
+ (trident-expand-region beg end)
(trident-expand-defun)))
;;;; Code evaluation