Function: jinx--correct-highlight

jinx--correct-highlight is a natively compiled function defined in jinx.el.

Signature

(jinx--correct-highlight OVERLAY FUN)

Documentation

Highlight and show OVERLAY during FUN.

Source Code

;; Defined in /nix/store/b5jnxgwmlp7hh60wfrx7amhrmrpfcqqi-emacs-packages-deps/share/emacs/site-lisp/elpa/jinx-20260926.912/jinx.el
(defun jinx--correct-highlight (overlay fun)
  "Highlight and show OVERLAY during FUN."
  (declare (indent 1))
  (let (restore)
    (goto-char (overlay-end overlay))
    (unwind-protect
        (let ((hl (make-overlay (overlay-start overlay) (overlay-end overlay))))
          (overlay-put hl 'face 'jinx-highlight)
          (overlay-put hl 'window (selected-window))
          (setq restore (cons (lambda () (delete-overlay hl))
                              (jinx--invisible-open-temporarily)))
          (funcall fun))
      (mapc #'funcall restore))))