comparison lisp/net/browse-url.el @ 106176:64f03bed7d67

* net/browse-url.el (browse-url-default-windows-browser): Use cygstart for cygwin.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 20 Nov 2009 21:49:46 +0000
parents 26baacb565b0
children c89e7ab6a9d6
comparison
equal deleted inserted replaced
106175:d4ca58110155 106176:64f03bed7d67
828 (defvar dos-windows-version) 828 (defvar dos-windows-version)
829 (declare-function w32-shell-execute "w32fns.c") ;; Defined in C. 829 (declare-function w32-shell-execute "w32fns.c") ;; Defined in C.
830 830
831 (defun browse-url-default-windows-browser (url &optional new-window) 831 (defun browse-url-default-windows-browser (url &optional new-window)
832 (interactive (browse-url-interactive-arg "URL: ")) 832 (interactive (browse-url-interactive-arg "URL: "))
833 (if (eq system-type 'ms-dos) 833 (cond ((eq system-type 'ms-dos)
834 (if dos-windows-version 834 (if dos-windows-version
835 (shell-command (concat "start " (shell-quote-argument url))) 835 (shell-command (concat "start " (shell-quote-argument url)))
836 (error "Browsing URLs is not supported on this system")) 836 (error "Browsing URLs is not supported on this system")))
837 (w32-shell-execute "open" url))) 837 ((eq system-type 'cygwin)
838 (shell-command (concat "cygstart " (shell-quote-argument url))))
839 (t (w32-shell-execute "open" url))))
838 840
839 (defun browse-url-default-macosx-browser (url &optional new-window) 841 (defun browse-url-default-macosx-browser (url &optional new-window)
840 (interactive (browse-url-interactive-arg "URL: ")) 842 (interactive (browse-url-interactive-arg "URL: "))
841 (start-process (concat "open " url) nil "open" url)) 843 (start-process (concat "open " url) nil "open" url))
842 844