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.
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'."
(let ((event (elt (this-command-keys) 0)))
(mouse-set-point 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)))
(not (eq (null browse-url-new-window-flag)
(null current-prefix-arg)))))