feat: Progress towards comfortable Lisp editing

This commit is contained in:
Madeleine Sydney
2025-02-02 14:51:04 -07:00
parent a345b5a72d
commit fc14c41edd
11 changed files with 623 additions and 39 deletions

View File

@@ -69,16 +69,24 @@ in some cases."
(read-string (if (stringp prompt) prompt "")))))
;;;###autoload
(defun syd-insert-newline-above ()
(defun syd-insert-newline-above (count)
"Insert a blank line below the current line."
(interactive)
(save-excursion (evil-insert-newline-above)))
(interactive "p")
(dotimes (_ count)
(let ((point-was-at-bol-p (= (current-column) 0)))
(save-excursion
(evil-insert-newline-above))
;; Special case: with `syd-insert-newline-above' is called with point at
;; BOL, the point unexpectedly fails to "stick" to its original position.
(when point-was-at-bol-p
(next-line)))))
;;;###autoload
(defun syd-insert-newline-below ()
(defun syd-insert-newline-below (count)
"Insert a blank line below the current line."
(interactive)
(save-excursion (evil-insert-newline-below)))
(interactive "p")
(dotimes (_ count)
(save-excursion (evil-insert-newline-below))))
;;;###autoload
(defun syd-render-ansi-escape-codes (beg end)