Function: rcirc-browse-url

rcirc-browse-url is an interactive and byte-compiled function defined in rcirc.el.gz.

Signature

(rcirc-browse-url &optional ARG)

Documentation

Prompt for URL to browse based on URLs in buffer before point.

If ARG is given, opens the URL in a new browser window, unless browse-url-new-window-flag is non-nil, in which case ARG means to not open the URL in a new browser window.

Probably introduced at or before Emacs version 32.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/net/rcirc.el.gz
(defun rcirc-browse-url (&optional arg)
  "Prompt for URL to browse based on URLs in buffer before point.

If ARG is given, opens the URL in a new browser window, unless
`browse-url-new-window-flag' is non-nil, in which case ARG means to not
open the URL in a new browser window."
  (interactive "P")
  (let* ((point (point))
         (filtered (seq-filter
                    (lambda (x) (>= point (cdr x)))
                    rcirc-urls))
         (completions (mapcar #'car filtered))
         (defaults (mapcar #'car filtered)))
    (browse-url (completing-read "Rcirc browse-url: "
                                 completions nil nil (car defaults) nil defaults)
                (xor (bound-and-true-p browse-url-new-window-flag)
                     arg))))