;;; browse-url.el --- ask a WWW browser to load a URL
-;; Copyright 1995 Free Software Foundation, Inc.
+
+;; Copyright 1995, 1996 Free Software Foundation, Inc.
;; Author: Denis Howe <dbh@doc.ic.ac.uk>
;; Maintainer: Denis Howe <dbh@doc.ic.ac.uk>
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published
-;; by the Free Software Foundation; either version 2, or (at your
-;; option) any later version.
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
-;; GNU Emacs is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Commentary:
;; The latest version of this package should be available from
(interactive (append (browse-url-interactive-arg "Netscape URL: ")
(list (not (eq (null browse-url-new-window-p)
(null current-prefix-arg))))))
- (or (zerop
- (apply 'call-process "netscape" nil nil nil
- (append browse-url-netscape-arguments
- (if new-window '("-noraise"))
- (list "-remote"
- (concat "openURL(" url
- (if new-window ",new-window")
- ")")))))
- (progn ; Netscape not running - start it
- (message "Starting Netscape...")
- (apply 'start-process "netscape" nil "netscape"
- (append browse-url-netscape-arguments (list url)))
- (message "Starting Netscape...done"))))
+ (let ((res
+ (apply 'call-process "netscape" nil nil nil
+ (append browse-url-netscape-arguments
+ (if new-window '("-noraise"))
+ (list "-remote"
+ (concat "openURL(" url
+ (if new-window ",new-window")
+ ")"))))
+ ))
+ (if (stringp res)
+ (error "netscape got signal: %s" res)
+ (or (zerop res)
+ (progn ; Netscape not running - start it
+ (message "Starting Netscape...")
+ (apply 'start-process "netscape" nil "netscape"
+ (append browse-url-netscape-arguments (list url))))))))
(defun browse-url-netscape-reload ()
"Ask Netscape to reload its current document."