Function: shr--current-link-region

shr--current-link-region is a byte-compiled function defined in shr.el.gz.

Signature

(shr--current-link-region)

Documentation

Return the start and end positions of the URL at point, if any.

Value is a pair of positions (START . END) if there is a non-nil shr-url text property at point; otherwise nil.

Source Code

;; Defined in /usr/src/emacs/lisp/net/shr.el.gz
(defun shr--current-link-region ()
  "Return the start and end positions of the URL at point, if any.
Value is a pair of positions (START . END) if there is a non-nil
`shr-url' text property at point; otherwise nil."
  (when (get-text-property (point) 'shr-url)
    (let* ((end (or (next-single-property-change (point) 'shr-url)
                    (point-max)))
           (beg (or (previous-single-property-change end 'shr-url)
                    (point-min))))
      (cons beg end))))