aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-12-26 20:47:42 +0200
committerEli Zaretskii2015-12-26 20:47:42 +0200
commit0191077d6a96d9ef8e43989fd5dc8a95e61806d5 (patch)
tree482d53ac57dac9fc115d7bad3efd81e05f68aaf6
parentb45828ee139dae3b9570883816453f5a451d35d3 (diff)
downloademacs-0191077d6a96d9ef8e43989fd5dc8a95e61806d5.tar.gz
emacs-0191077d6a96d9ef8e43989fd5dc8a95e61806d5.zip
Fix documentation of browse-url browser-related functions
* lisp/net/browse-url.el (browse-url) (browse-url-default-browser, browse-url-default-windows-browser) (browse-url-default-macosx-browser, browse-url-chromium) (browse-url-kde, browse-url-text-xterm): Clarify the usage of ARGS and NEW-WINDOW arguments in these functions. (Bug#19421)
-rw-r--r--lisp/net/browse-url.el30
1 files changed, 21 insertions, 9 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index feb0788db92..d232c8add13 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -762,12 +762,17 @@ narrowed."
762(defun browse-url (url &rest args) 762(defun browse-url (url &rest args)
763 "Ask a WWW browser to load URL. 763 "Ask a WWW browser to load URL.
764Prompt for a URL, defaulting to the URL at or before point. 764Prompt for a URL, defaulting to the URL at or before point.
765The variable `browse-url-browser-function' says which browser to use. 765Invokes a suitable browser function which does the actual job.
766If the URL is a mailto: URL, consult `browse-url-mailto-function' 766The variable `browse-url-browser-function' says which browser function to
767use. If the URL is a mailto: URL, consult `browse-url-mailto-function'
767first, if that exists. 768first, if that exists.
768 769
769Passes any ARGS to the browser function. 770The additional ARGS are passed to the browser function. See the doc
770The default is to pass `browse-url-new-window-flag'." 771strings of the actual functions, starting with `browse-url-browser-function',
772for information about the significance of ARGS (most of the functions
773ignore it).
774If ARGS are omitted, the default is to pass `browse-url-new-window-flag'
775as ARGS."
771 (interactive (browse-url-interactive-arg "URL: ")) 776 (interactive (browse-url-interactive-arg "URL: "))
772 (unless (called-interactively-p 'interactive) 777 (unless (called-interactively-p 'interactive)
773 (setq args (or args (list browse-url-new-window-flag)))) 778 (setq args (or args (list browse-url-new-window-flag))))
@@ -836,6 +841,8 @@ says which browser to use."
836(declare-function w32-shell-execute "w32fns.c") ;; Defined in C. 841(declare-function w32-shell-execute "w32fns.c") ;; Defined in C.
837 842
838(defun browse-url-default-windows-browser (url &optional _new-window) 843(defun browse-url-default-windows-browser (url &optional _new-window)
844 "Invoke the MS-Windows system's default Web browser.
845The optional NEW-WINDOW argument is not used."
839 (interactive (browse-url-interactive-arg "URL: ")) 846 (interactive (browse-url-interactive-arg "URL: "))
840 (cond ((eq system-type 'ms-dos) 847 (cond ((eq system-type 'ms-dos)
841 (if dos-windows-version 848 (if dos-windows-version
@@ -846,6 +853,8 @@ says which browser to use."
846 (t (w32-shell-execute "open" url)))) 853 (t (w32-shell-execute "open" url))))
847 854
848(defun browse-url-default-macosx-browser (url &optional _new-window) 855(defun browse-url-default-macosx-browser (url &optional _new-window)
856 "Invoke the MacOS X system's default Web browser.
857The optional NEW-WINDOW argument is not used"
849 (interactive (browse-url-interactive-arg "URL: ")) 858 (interactive (browse-url-interactive-arg "URL: "))
850 (start-process (concat "open " url) nil "open" url)) 859 (start-process (concat "open " url) nil "open" url))
851 860
@@ -880,8 +889,8 @@ non-nil, load the document in a new window, if possible, otherwise use
880a random existing one. A non-nil interactive prefix argument reverses 889a random existing one. A non-nil interactive prefix argument reverses
881the effect of `browse-url-new-window-flag'. 890the effect of `browse-url-new-window-flag'.
882 891
883When called non-interactively, optional second argument NEW-WINDOW is 892When called non-interactively, optional second argument ARGS is used
884used instead of `browse-url-new-window-flag'." 893instead of `browse-url-new-window-flag'."
885 (apply 894 (apply
886 (cond 895 (cond
887 ((memq system-type '(windows-nt ms-dos cygwin)) 896 ((memq system-type '(windows-nt ms-dos cygwin))
@@ -1103,7 +1112,8 @@ instead of `browse-url-new-window-flag'."
1103 "Ask the Chromium WWW browser to load URL. 1112 "Ask the Chromium WWW browser to load URL.
1104Default to the URL around or before point. The strings in 1113Default to the URL around or before point. The strings in
1105variable `browse-url-chromium-arguments' are also passed to 1114variable `browse-url-chromium-arguments' are also passed to
1106Chromium." 1115Chromium.
1116The optional argument NEW-WINDOW is not used."
1107 (interactive (browse-url-interactive-arg "URL: ")) 1117 (interactive (browse-url-interactive-arg "URL: "))
1108 (setq url (browse-url-encode-url url)) 1118 (setq url (browse-url-encode-url url))
1109 (let* ((process-environment (browse-url-process-environment))) 1119 (let* ((process-environment (browse-url-process-environment)))
@@ -1412,7 +1422,8 @@ The `browse-url-gnudoit-program' program is used with options given by
1412URL defaults to the URL around or before point. 1422URL defaults to the URL around or before point.
1413This runs the text browser specified by `browse-url-text-browser'. 1423This runs the text browser specified by `browse-url-text-browser'.
1414in an Xterm window using the Xterm program named by `browse-url-xterm-program' 1424in an Xterm window using the Xterm program named by `browse-url-xterm-program'
1415with possible additional arguments `browse-url-xterm-args'." 1425with possible additional arguments `browse-url-xterm-args'.
1426The optional argument NEW-WINDOW is not used."
1416 (interactive (browse-url-interactive-arg "Text browser URL: ")) 1427 (interactive (browse-url-interactive-arg "Text browser URL: "))
1417 (apply #'start-process `(,(concat browse-url-text-browser url) 1428 (apply #'start-process `(,(concat browse-url-text-browser url)
1418 nil ,browse-url-xterm-program 1429 nil ,browse-url-xterm-program
@@ -1560,7 +1571,8 @@ don't offer a form of remote control."
1560;;;###autoload 1571;;;###autoload
1561(defun browse-url-kde (url &optional _new-window) 1572(defun browse-url-kde (url &optional _new-window)
1562 "Ask the KDE WWW browser to load URL. 1573 "Ask the KDE WWW browser to load URL.
1563Default to the URL around or before point." 1574Default to the URL around or before point.
1575The optional argument NEW-WINDOW is not used."
1564 (interactive (browse-url-interactive-arg "KDE URL: ")) 1576 (interactive (browse-url-interactive-arg "KDE URL: "))
1565 (message "Sending URL to KDE...") 1577 (message "Sending URL to KDE...")
1566 (apply #'start-process (concat "KDE " url) nil browse-url-kde-program 1578 (apply #'start-process (concat "KDE " url) nil browse-url-kde-program