Function: embark-target-url-at-point

embark-target-url-at-point is a natively compiled function defined in embark.el.

Signature

(embark-target-url-at-point)

Documentation

Target the URL at point.

Source Code

;; Defined in /nix/store/lls066p88vbzffl5j0d16jbhwpn2zfz2-emacs-packages-deps/share/emacs/site-lisp/elpa/embark-20260610.302/embark.el
(defun embark-target-url-at-point ()
  "Target the URL at point."
  (if-let* ((url (or (get-text-property (point) 'shr-url)
                     (get-text-property (point) 'image-url))))
      `(url ,url
            ,(previous-single-property-change
              (min (1+ (point)) (point-max)) 'mouse-face nil (point-min))
            . ,(next-single-property-change
                (point) 'mouse-face nil (point-max)))
    (when-let* ((url (thing-at-point 'url)))
      `(url ,url . ,(thing-at-point-bounds-of-url-at-point t)))))