Skip to content

Commit e366bda

Browse files
committed
Merge branch 'garlic0x1-expand-in-place'
2 parents 0fab8bb + 842df6f commit e366bda

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

extensions/lisp-mode/macroexpand.lisp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,16 @@ Do you want to disable this message in the future?"
254254
(when self
255255
(move-point (buffer-point buffer) p))))))))
256256

257+
(define-command lisp-macroexpand-in-place () ()
258+
(check-connection)
259+
(lisp-eval-async
260+
`(micros:swank-macroexpand-1
261+
(lem-lisp-mode/internal::form-string-at-point))
262+
(lambda (string)
263+
(kill-sexp)
264+
(insert-string (current-point) string)
265+
(indent-buffer (current-buffer)))))
266+
257267
(define-command lisp-macroexpand () ()
258268
(check-connection)
259269
(macroexpand-internal 'micros:swank-macroexpand-1))

0 commit comments

Comments
 (0)