Mercurial > emacs
comparison lisp/browse-url.el @ 24657:5b211965b2b9
(browse-url-browser-function): Default to
browse-url-default-windows-browser on windows-nt.
(browse-url-default-windows-browser): New function.
author | Andrew Innes <andrewi@gnu.org> |
---|---|
date | Sun, 02 May 1999 09:34:41 +0000 |
parents | fd669611d301 |
children | bf45371ca138 |
comparison
equal
deleted
inserted
replaced
24656:a2148e59e0eb | 24657:5b211965b2b9 |
---|---|
230 :prefix "browse-url-" | 230 :prefix "browse-url-" |
231 :group 'hypermedia) | 231 :group 'hypermedia) |
232 | 232 |
233 ;;;###autoload | 233 ;;;###autoload |
234 (defcustom browse-url-browser-function | 234 (defcustom browse-url-browser-function |
235 'browse-url-netscape | 235 (if (eq system-type 'windows-nt) |
236 'browse-url-default-windows-browser | |
237 'browse-url-netscape) | |
236 "*Function to display the current buffer in a WWW browser. | 238 "*Function to display the current buffer in a WWW browser. |
237 This is used by the `browse-url-at-point', `browse-url-at-mouse', and | 239 This is used by the `browse-url-at-point', `browse-url-at-mouse', and |
238 `browse-url-of-file' commands. | 240 `browse-url-of-file' commands. |
239 | 241 |
240 If the value is not a function it should be a list of pairs | 242 If the value is not a function it should be a list of pairs |
256 :value browse-url-lynx-emacs) | 258 :value browse-url-lynx-emacs) |
257 (function-item :tag "Grail" :value browse-url-grail) | 259 (function-item :tag "Grail" :value browse-url-grail) |
258 (function-item :tag "MMM" :value browse-url-mmm) | 260 (function-item :tag "MMM" :value browse-url-mmm) |
259 (function-item :tag "Specified by `Browse Url Generic Program'" | 261 (function-item :tag "Specified by `Browse Url Generic Program'" |
260 :value browse-url-generic) | 262 :value browse-url-generic) |
263 (function-item :tag "Default Windows browser" | |
264 :value browse-url-default-windows-browser) | |
261 (function :tag "Your own function")) | 265 (function :tag "Your own function")) |
262 :group 'browse-url) | 266 :group 'browse-url) |
263 | 267 |
264 (defcustom browse-url-netscape-program "netscape" | 268 (defcustom browse-url-netscape-program "netscape" |
265 ;; Info about netscape-remote from Karl Berry. | 269 ;; Info about netscape-remote from Karl Berry. |
651 (error "No URL found")) | 655 (error "No URL found")) |
652 (browse-url url browse-url-new-window-p)))) | 656 (browse-url url browse-url-new-window-p)))) |
653 | 657 |
654 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 658 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
655 ;; Browser-specific commands | 659 ;; Browser-specific commands |
660 | |
661 ;; --- Default MS-Windows browser --- | |
662 | |
663 (defun browse-url-default-windows-browser (url &optional new-window) | |
664 (interactive (browse-url-interactive-arg "URL: ")) | |
665 (w32-shell-execute "open" url)) | |
656 | 666 |
657 ;; --- Netscape --- | 667 ;; --- Netscape --- |
658 | 668 |
659 (defun browse-url-process-environment () | 669 (defun browse-url-process-environment () |
660 "Set DISPLAY in the environment to the X display Netscape is running on. | 670 "Set DISPLAY in the environment to the X display Netscape is running on. |