comparison lisp/net/browse-url.el @ 38271:bb01ee99b910

(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.
author Eli Zaretskii <eliz@gnu.org>
date Tue, 03 Jul 2001 12:40:51 +0000
parents ae3f8f955b05
children b174db545cfd
comparison
equal deleted inserted replaced
38270:c466cc20f435 38271:bb01ee99b910
234 :link '(emacs-commentary-link "browse-url") 234 :link '(emacs-commentary-link "browse-url")
235 :group 'hypermedia) 235 :group 'hypermedia)
236 236
237 ;;;###autoload 237 ;;;###autoload
238 (defcustom browse-url-browser-function 238 (defcustom browse-url-browser-function
239 (if (eq system-type 'windows-nt) 239 (if (memq system-type '(windows-nt ms-dos))
240 'browse-url-default-windows-browser 240 'browse-url-default-windows-browser
241 'browse-url-netscape) 241 'browse-url-netscape)
242 "*Function to display the current buffer in a WWW browser. 242 "*Function to display the current buffer in a WWW browser.
243 This is used by the `browse-url-at-point', `browse-url-at-mouse', and 243 This is used by the `browse-url-at-point', `browse-url-at-mouse', and
244 `browse-url-of-file' commands. 244 `browse-url-of-file' commands.
668 668
669 ;; --- Default MS-Windows browser --- 669 ;; --- Default MS-Windows browser ---
670 670
671 (defun browse-url-default-windows-browser (url &optional new-window) 671 (defun browse-url-default-windows-browser (url &optional new-window)
672 (interactive (browse-url-interactive-arg "URL: ")) 672 (interactive (browse-url-interactive-arg "URL: "))
673 (w32-shell-execute "open" url)) 673 (if (eq system-type 'ms-dos)
674 (if dos-windows-version
675 (shell-command (concat "start " (shell-quote-argument url)))
676 (error "Browsing URLs is not supported on this system"))
677 (w32-shell-execute "open" url)))
674 678
675 ;; --- Netscape --- 679 ;; --- Netscape ---
676 680
677 (defun browse-url-process-environment () 681 (defun browse-url-process-environment ()
678 "Set DISPLAY in the environment to the X display Netscape is running on. 682 "Set DISPLAY in the environment to the X display Netscape is running on.