Skip to content

Commit

Permalink
fix indent
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxxr committed Feb 9, 2024
1 parent dc475a2 commit 842df6f
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions extensions/lisp-mode/macroexpand.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
(backward-up-list point)
(skip-chars-backward point #'syntax-expr-prefix-char-p))
(values point
(form-offset (copy-point point :temporary) 1)))
(form-offset (copy-point point :temporary) 1)))

(defmacro with-form-points ((start end point) &body body)
(check-type start symbol)
Expand Down Expand Up @@ -223,8 +223,8 @@
"Press \"q\" to undo.
Do you want to disable this message in the future?"
:gravity (make-instance 'lem/popup-window::gravity-cursor
:offset-x 1
:offset-y 1))
:offset-x 1
:offset-y 1))
(lisp-macrostep-disable-help)))))

(defun guard () (error 'read-only-error))
Expand All @@ -236,23 +236,23 @@ Do you want to disable this message in the future?"
(orig-package-name (buffer-package (current-buffer) "CL-USER"))
(p (and self (copy-point (current-point) :temporary))))
(lisp-eval-async `(,expander ,(lem-lisp-mode/internal::form-string-at-point))
(lambda (string)
(let ((buffer (make-buffer "*lisp-macroexpand*")))
(with-buffer-read-only buffer nil
(unless self (erase-buffer buffer))
(change-buffer-mode buffer 'lisp-mode)
(setf (buffer-package buffer) orig-package-name)
(when self
(move-point (current-point) p)
(kill-sexp))
(insert-string (buffer-point buffer)
string)
(indent-points (buffer-start-point buffer)
(buffer-end-point buffer))
(with-pop-up-typeout-window (s buffer)
(declare (ignore s)))
(when self
(move-point (buffer-point buffer) p))))))))
(lambda (string)
(let ((buffer (make-buffer "*lisp-macroexpand*")))
(with-buffer-read-only buffer nil
(unless self (erase-buffer buffer))
(change-buffer-mode buffer 'lisp-mode)
(setf (buffer-package buffer) orig-package-name)
(when self
(move-point (current-point) p)
(kill-sexp))
(insert-string (buffer-point buffer)
string)
(indent-points (buffer-start-point buffer)
(buffer-end-point buffer))
(with-pop-up-typeout-window (s buffer)
(declare (ignore s)))
(when self
(move-point (buffer-point buffer) p))))))))

(define-command lisp-macroexpand-in-place () ()
(check-connection)
Expand Down

0 comments on commit 842df6f

Please sign in to comment.