]> code.delx.au - gnu-emacs/commitdiff
(browse-url-browser-function): Default to
authorAndrew Innes <andrewi@gnu.org>
Sun, 2 May 1999 09:34:41 +0000 (09:34 +0000)
committerAndrew Innes <andrewi@gnu.org>
Sun, 2 May 1999 09:34:41 +0000 (09:34 +0000)
browse-url-default-windows-browser on windows-nt.
(browse-url-default-windows-browser): New function.

lisp/browse-url.el

index d58a8d382b94f37d310e4af1f21bdf55db656223..3ac0ffe776f879576e11126032bc477108f7bd50 100644 (file)
 
 ;;;###autoload
 (defcustom browse-url-browser-function
-  'browse-url-netscape
+  (if (eq system-type 'windows-nt)
+      'browse-url-default-windows-browser
+    'browse-url-netscape)
   "*Function to display the current buffer in a WWW browser.
 This is used by the `browse-url-at-point', `browse-url-at-mouse', and
 `browse-url-of-file' commands.
@@ -258,6 +260,8 @@ regexp should probably be \".\" to specify a default browser."
            (function-item :tag "MMM" :value  browse-url-mmm)
            (function-item :tag "Specified by `Browse Url Generic Program'"
                           :value browse-url-generic)
+           (function-item :tag "Default Windows browser"
+                          :value  browse-url-default-windows-browser)
            (function :tag "Your own function"))
   :group 'browse-url)
 
@@ -654,6 +658,12 @@ to use."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Browser-specific commands
 
+;; --- Default MS-Windows browser ---
+
+(defun browse-url-default-windows-browser (url &optional new-window)
+  (interactive (browse-url-interactive-arg "URL: "))
+  (w32-shell-execute "open" url))
+
 ;; --- Netscape ---
 
 (defun browse-url-process-environment ()