From ef233c018aa05847503dcbc37d5d78bd6537af82 Mon Sep 17 00:00:00 2001 From: Andrew Innes Date: Sun, 2 May 1999 09:34:41 +0000 Subject: [PATCH] (browse-url-browser-function): Default to browse-url-default-windows-browser on windows-nt. (browse-url-default-windows-browser): New function. --- lisp/browse-url.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/browse-url.el b/lisp/browse-url.el index d58a8d382b9..3ac0ffe776f 100644 --- a/lisp/browse-url.el +++ b/lisp/browse-url.el @@ -232,7 +232,9 @@ ;;;###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 () -- 2.39.2