Function: browse-url-interactive-arg
browse-url-interactive-arg is a byte-compiled function defined in
browse-url.el.gz.
Signature
(browse-url-interactive-arg PROMPT)
Documentation
Read a URL from the minibuffer, prompting with PROMPT.
If transient-mark-mode(var)/transient-mark-mode(fun) is non-nil and the mark is active,
it defaults to the current region, else to the URL at or before
point. If invoked with a mouse button, it moves point to the
position clicked before acting.
This function returns a list (URL NEW-WINDOW-FLAG) for use in
interactive. NEW-WINDOW-FLAG is the prefix arg; if
browse-url-new-window-flag is non-nil, invert the prefix arg
instead.
Source Code
;; Defined in /usr/src/emacs/lisp/net/browse-url.el.gz
;; Having this as a separate function called by the browser-specific
;; functions allows them to be stand-alone commands, making it easier
;; to switch between browsers.
(defun browse-url-interactive-arg (prompt)
"Read a URL from the minibuffer, prompting with PROMPT.
If `transient-mark-mode' is non-nil and the mark is active,
it defaults to the current region, else to the URL at or before
point. If invoked with a mouse button, it moves point to the
position clicked before acting.
This function returns a list (URL NEW-WINDOW-FLAG) for use in
`interactive'. NEW-WINDOW-FLAG is the prefix arg; if
`browse-url-new-window-flag' is non-nil, invert the prefix arg
instead."
(mouse-set-point last-nonmenu-event)
(list (read-string prompt (or (and transient-mark-mode mark-active
;; rfc2396 Appendix E.
(replace-regexp-in-string
"[\t\r\f\n ]+" ""
(buffer-substring-no-properties
(region-beginning) (region-end))))
(browse-url-url-at-point)))
(xor browse-url-new-window-flag current-prefix-arg)))