aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-07-24 16:11:21 +0000
committerRichard M. Stallman1996-07-24 16:11:21 +0000
commit8bc9b4f136638e2f632008fe348e00f18b91ea6c (patch)
treeed95d3a10b6d1f33edb773a8aef216c24516aa0d
parentfc42d823cfd0e599a98c18ed4cf4f057e8aeb125 (diff)
downloademacs-8bc9b4f136638e2f632008fe348e00f18b91ea6c.tar.gz
emacs-8bc9b4f136638e2f632008fe348e00f18b91ea6c.zip
(browse-url-choose-browser): New function.
(browse-url-browser-function): Use browse-url-choose-browser as the initial value.
-rw-r--r--lisp/browse-url.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/browse-url.el b/lisp/browse-url.el
index 445918632a6..6d7ef6fe6a0 100644
--- a/lisp/browse-url.el
+++ b/lisp/browse-url.el
@@ -261,10 +261,11 @@
261 "A regular expression probably matching a URL.") 261 "A regular expression probably matching a URL.")
262 262
263(defvar browse-url-browser-function 263(defvar browse-url-browser-function
264 'browse-url-netscape 264 'browse-url-choose-browser
265 "*Function to display the current buffer in a WWW browser. 265 "*Function to display the current buffer in a WWW browser.
266Used by the `browse-url-at-point', `browse-url-at-mouse', and 266This is used by the `browse-url-at-point', `browse-url-at-mouse', and
267`browse-url-of-file' commands.") 267`browse-url-of-file' commands.
268The function should take one argument, an URL.")
268 269
269(defvar browse-url-netscape-program "netscape" 270(defvar browse-url-netscape-program "netscape"
270 "*The name for invoking Netscape.") 271 "*The name for invoking Netscape.")
@@ -591,6 +592,14 @@ Default to the URL around or before point."
591 (interactive (browse-url-interactive-arg "W3 URL: ")) 592 (interactive (browse-url-interactive-arg "W3 URL: "))
592 (w3-fetch url)) 593 (w3-fetch url))
593 594
595(defun browse-url-choose-browser (argument)
596 "Decide which browser to use, then invoke it.
597This is the default value of `browse-url-browser-function'."
598 (if (fboundp 'w3-fetch)
599 (setq browse-url-browser-function 'browse-url-w3)
600 (setq browse-url-browser-function 'browse-url-netscape))
601 (funcall browse-url-browser-function argument))
602
594(provide 'browse-url) 603(provide 'browse-url)
595 604
596;;; browse-url.el ends here 605;;; browse-url.el ends here