]> git.eshelyaron.com Git - emacs.git/commitdiff
(browse-url-netscape): Check for call-process returning a string.
authorRichard M. Stallman <rms@gnu.org>
Thu, 25 Jan 1996 20:14:38 +0000 (20:14 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 25 Jan 1996 20:14:38 +0000 (20:14 +0000)
lisp/browse-url.el

index ae4cc5d4d19396c557a5ad1b97b4a24f9eead1c7..cb440398b5474d39407296136b9249aa7fe527a3 100644 (file)
@@ -486,19 +486,22 @@ used instead of browse-url-new-window-p."
   (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."