Function: jinx-correct-word

jinx-correct-word is an interactive and natively compiled function defined in jinx.el.

Signature

(jinx-correct-word &optional START END INITIAL)

Documentation

Correct word between START and END, by default the word before point.

Suggest corrections even if the word is not misspelled. Optionally insert INITIAL input in the minibuffer.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/b5jnxgwmlp7hh60wfrx7amhrmrpfcqqi-emacs-packages-deps/share/emacs/site-lisp/elpa/jinx-20260926.912/jinx.el
                  (incf idx)))))))) ;; Skip deleted overlay

;;;###autoload
(defun jinx-correct-word (&optional start end initial)
  "Correct word between START and END, by default the word before point.
Suggest corrections even if the word is not misspelled.
Optionally insert INITIAL input in the minibuffer."
  (interactive)
  (unless (and start end)
    (setf (cons start end) (or (jinx--bounds-of-word)
                               (user-error "No word at point"))))
  (save-excursion
    (jinx--correct-guard
     (while-let ((skip (let ((ov (make-overlay start end)))
                         (unwind-protect
                             (jinx--correct-overlay ov :initial initial)
                           (delete-overlay ov)))))
       (forward-to-word skip)
       (when-let* ((bounds (jinx--bounds-of-word)))
         (setf (cons start end) bounds
               initial nil))))))