This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun chatgpt-shell-check-and-correct-paragraph () | |
"Check and correct the current paragraph using ChatGPT." | |
(interactive) | |
(let* ((bounds (bounds-of-thing-at-point 'paragraph)) | |
(start (car bounds)) | |
(end (cdr bounds)) | |
(original-text (buffer-substring-no-properties start end)) | |
(point-offset (- end (point))) ; Save the offset of point from end | |
(checked-text (chatgpt-shell-check-paragraph original-text))) | |
(when checked-text |