Function: gnus-collect-urls

gnus-collect-urls is a byte-compiled function defined in gnus-sum.el.gz.

Signature

(gnus-collect-urls)

Documentation

Return the list of URLs in the buffer after (point).

The 1st element is the button named by gnus-collect-urls-primary-text.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-collect-urls ()
  "Return the list of URLs in the buffer after (point).
The 1st element is the button named by `gnus-collect-urls-primary-text'."
  (let ((pt (point)) urls primary)
    (while (forward-button 1 nil nil t)
      (setq pt (point))
      (when-let ((w (button-at pt))
                 (u (or (button-get w 'shr-url)
                        (get-text-property pt 'gnus-string))))
	(when (string-match-p "\\`[[:alpha:]]+://" u)
          (if (and gnus-collect-urls-primary-text (null primary)
                   (string= gnus-collect-urls-primary-text (button-label w)))
              (setq primary u)
	    (push u urls)))))
    (setq urls (nreverse urls))
    (when primary
      (push primary urls))
    (delete-dups urls)))