Function: ghostel--queue-plain-link-detection

ghostel--queue-plain-link-detection is a natively compiled function defined in ghostel-links.el.

Signature

(ghostel--queue-plain-link-detection BEGIN END)

Documentation

Coalesce redraw-triggered plain-text link detection for BEGIN..END.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-links.el
(defun ghostel--queue-plain-link-detection (begin end)
  "Coalesce redraw-triggered plain-text link detection for BEGIN..END."
  (when (and begin end (<= begin end))
    (if ghostel--plain-link-detection-begin
        (when (< begin ghostel--plain-link-detection-begin)
          (set-marker ghostel--plain-link-detection-begin begin))
      (setq ghostel--plain-link-detection-begin (copy-marker begin)))
    (if ghostel--plain-link-detection-end
        (when (> end ghostel--plain-link-detection-end)
          (set-marker ghostel--plain-link-detection-end end))
      (setq ghostel--plain-link-detection-end (copy-marker end)))
    (unless ghostel--plain-link-detection-timer
      (if (<= ghostel-plain-link-detection-delay 0)
          (ghostel--run-queued-plain-link-detection (current-buffer))
        (setq ghostel--plain-link-detection-timer
              (run-with-timer ghostel-plain-link-detection-delay nil
                              #'ghostel--run-queued-plain-link-detection
                              (current-buffer)))))))