]> code.delx.au - gnu-emacs/blobdiff - lisp/browse-url.el
(mark-fortran-subprogram): Activate mark
[gnu-emacs] / lisp / browse-url.el
index cc63b39c7bd0c3b7d20ab9897fded7c722c2cf37..e87dc096a95d9ac631479bb2818b56cfe0338d1b 100644 (file)
@@ -262,16 +262,14 @@ regexp should probably be \".\" to specify a default browser."
   :group 'browse-url)
 
 (defcustom browse-url-netscape-program "netscape"
-  ;; Info about netscape-remote from Kurt Swanson in gnu.emacs.gnus
+  ;; Info about netscape-remote from Karl Berry.
   "The name by which to invoke Netscape.
 
-It is said that source is available for a program `netscape-remote'
-which starts up very much quicker than `netscape' and that it is
-useful to set this variable to the name of a script which invokes that
-program like:
- #!/bin/sh
- /usr/local/bin/netscape-remote \"$@\" > /dev/null 2>&1
-"
+The free program `netscape-remote' from
+<URL:http://home.netscape.com/newsref/std/remote.c> is said to start
+up very much quicker than `netscape'.  Reported to compile on a GNU
+system, given vroot.h from the same directory, with cc flags
+ -DSTANDALONE -L/usr/X11R6/lib -lXmu -lX11."
   :type 'string
   :group 'browse-url)
 
@@ -492,13 +490,6 @@ negation if a prefix argument was given."
        (not (eq (null browse-url-new-window-p)
                 (null current-prefix-arg)))))
 
-;; interactive-p needs to be called at a function's top-level, hence
-;; the macro.
-(defmacro browse-url-maybe-new-window (arg)
-  `(if (interactive-p)
-       'arg
-     browse-url-new-window-p))
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Browse current buffer
 
@@ -717,9 +708,7 @@ used instead of `browse-url-new-window-p'."
                             (if new-window '("-noraise"))
                             (list "-remote"
                                   (concat "openURL(" url
-                                          (if (browse-url-maybe-new-window
-                                               new-window)
-                                              ",new-window")
+                                          (if new-window ",new-window")
                                           ")"))))))))
     (set-process-sentinel process
                          (list 'lambda '(process change)
@@ -757,7 +746,6 @@ How depends on `browse-url-netscape-version'."
 
 ;;;###autoload
 (defun browse-url-mosaic (url &optional new-window)
-  ;; new-window ignored
   "Ask the XMosaic WWW browser to load URL.
 
 Default to the URL around or before point.  The strings in variable
@@ -785,9 +773,9 @@ used instead of `browse-url-new-window-p'."
        (save-excursion
          (find-file (format "/tmp/Mosaic.%d" pid))
          (erase-buffer)
-         (insert (if (browse-url-maybe-new-window new-window)
+         (insert (if new-window
                      "newwin\n"
-                     "goto\n")
+                   "goto\n")
                  url "\n")
          (save-buffer)
          (kill-buffer nil)
@@ -852,7 +840,7 @@ used instead of `browse-url-new-window-p'."
   ;; Todo: start browser if fails
   (process-send-string "browse-url"
                       (concat "get url (" url ") output "
-                              (if (browse-url-maybe-new-window new-window)
+                              (if new-window
                                   "new"
                                 "current")
                               "\r\n"))
@@ -885,7 +873,7 @@ When called non-interactively, optional second argument NEW-WINDOW is
 used instead of `browse-url-new-window-p'."
   (interactive (browse-url-interactive-arg "W3 URL: "))
   (require 'w3)                                ; w3-fetch-other-window not autoloaded
-  (if (browse-url-maybe-new-window new-window)
+  (if new-window
       (w3-fetch-other-window url)
     (w3-fetch url)))
 
@@ -934,13 +922,13 @@ used instead of `browse-url-new-window-p'."
         (buf (get-buffer "*lynx*"))
         (proc (and buf (get-buffer-process buf)))
         (n browse-url-lynx-input-attempts))
-    (if (and (browse-url-maybe-new-window new-buffer) buf)
+    (if (and new-buffer buf)
        ;; Rename away the OLD buffer. This isn't very polite, but
        ;; term insists on working in a buffer named *lynx* and would
        ;; choke on *lynx*<1>
        (progn (set-buffer buf)
               (rename-uniquely)))
-    (if (or (browse-url-maybe-new-window new-buffer)
+    (if (or new-buffer
            (not buf)
            (not proc)
            (not (memq (process-status proc) '(run stop))))
@@ -1019,7 +1007,7 @@ used instead of `browse-url-new-window-p'."
     (let ((to (if (string-match "^mailto:" url)
                  (substring url 7)
                url)))
-      (if (browse-url-maybe-new-window new-window)
+      (if new-window
          (compose-mail-other-window to nil nil nil
                                     (list 'insert-buffer (current-buffer)))
        (compose-mail to nil nil nil nil