(browse-url-default-windows-browser): Support
authorEli Zaretskii <eliz@gnu.org>
Tue, 3 Jul 2001 12:41:58 +0000 (12:41 +0000)
committerEli Zaretskii <eliz@gnu.org>
Tue, 3 Jul 2001 12:41:58 +0000 (12:41 +0000)
the MS-DOS port when it runs on Windows.
(browse-url-browser-function) [ms-dos]: Default to
browse-url-default-windows-browser.

lisp/ChangeLog
lisp/net/browse-url.el

index e1259af..aa4ef38 100644 (file)
@@ -1,5 +1,10 @@
 2001-07-03  Eli Zaretskii  <eliz@is.elta.co.il>
 
+       * net/browse-url.el (browse-url-default-windows-browser): Support
+       the MS-DOS port when it runs on Windows.
+       (browse-url-browser-function) [ms-dos]: Default to
+       browse-url-default-windows-browser.
+
        * help.el (locate-library): Enable code that looks for compressed
        libraries if auto-compression-mode is on.
 
index 5419ed6..3b516c2 100644 (file)
 
 ;;;###autoload
 (defcustom browse-url-browser-function
-  (if (eq system-type 'windows-nt)
+  (if (memq system-type '(windows-nt ms-dos))
       'browse-url-default-windows-browser
     'browse-url-netscape)
   "*Function to display the current buffer in a WWW browser.
@@ -670,7 +670,11 @@ to use."
 
 (defun browse-url-default-windows-browser (url &optional new-window)
   (interactive (browse-url-interactive-arg "URL: "))
-  (w32-shell-execute "open" url))
+  (if (eq system-type 'ms-dos)
+      (if dos-windows-version
+         (shell-command (concat "start " (shell-quote-argument url)))
+       (error "Browsing URLs is not supported on this system"))
+    (w32-shell-execute "open" url)))
 
 ;; --- Netscape ---