From 89cf7f454961d34a3e6731d8bf1505b11bef365c Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Sun, 4 May 2025 19:29:20 +0200 Subject: [fix] --- trident-mode.el | 13 ++++++------- 1 file 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 -- cgit v1.2.3