aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-10-07 17:58:33 +0000
committerDave Love2000-10-07 17:58:33 +0000
commitde5552d505b0b264081e8c1ef00d6bb98f1fe1c2 (patch)
tree51cd72ffa9cbfde1eb3f2453c0e625bf9942d03b
parent3bb2feafaaf4e8a003c6f569c6b263c150377c87 (diff)
downloademacs-de5552d505b0b264081e8c1ef00d6bb98f1fe1c2.tar.gz
emacs-de5552d505b0b264081e8c1ef00d6bb98f1fe1c2.zip
(browse-url-gnome-moz-arguments): New option.
(browse-url-gnome-moz): New function. Suggested by Colin Walters <walters@cis.ohio-state.edu>.
-rw-r--r--lisp/net/browse-url.el33
1 files changed, 31 insertions, 2 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 5b37ea1ea88..ac3d43e2a84 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -678,7 +678,6 @@ one showing the selected frame."
678;;;###autoload 678;;;###autoload
679(defun browse-url-netscape (url &optional new-window) 679(defun browse-url-netscape (url &optional new-window)
680 "Ask the Netscape WWW browser to load URL. 680 "Ask the Netscape WWW browser to load URL.
681
682Default to the URL around or before point. The strings in variable 681Default to the URL around or before point. The strings in variable
683`browse-url-netscape-arguments' are also passed to Netscape. 682`browse-url-netscape-arguments' are also passed to Netscape.
684 683
@@ -689,7 +688,7 @@ the effect of `browse-url-new-window-p'.
689 688
690When called non-interactively, optional second argument NEW-WINDOW is 689When called non-interactively, optional second argument NEW-WINDOW is
691used instead of `browse-url-new-window-p'." 690used instead of `browse-url-new-window-p'."
692 (interactive (browse-url-interactive-arg "Netscape URL: ")) 691 (interactive (browse-url-interactive-arg "URL: "))
693 ;; URL encode any `confusing' characters in the URL. This needs to 692 ;; URL encode any `confusing' characters in the URL. This needs to
694 ;; include at least commas; presumably also close parens. 693 ;; include at least commas; presumably also close parens.
695 (while (string-match "[,)]" url) 694 (while (string-match "[,)]" url)
@@ -743,6 +742,36 @@ How depends on `browse-url-netscape-version'."
743 (append browse-url-netscape-arguments 742 (append browse-url-netscape-arguments
744 (list "-remote" command))))) 743 (list "-remote" command)))))
745 744
745;; GNOME means of invoking either Mozilla or Netrape.
746
747(defcustom browse-url-gnome-moz-arguments '()
748 "A list of strings passed to the GNOME mozilla viewer as arguments."
749 :version "21.1"
750 :type '(repeat (string :tag "Argument"))
751 :group 'browse-url)
752
753(defun browse-url-gnome-moz (url &optional new-window)
754 "Ask Mozilla/Netscape to load URL via the GNOME program `gnome-moz-remote'.
755Default to the URL around or before point. The strings in variable
756`browse-url-gnome-moz-arguments' are also passed.
757
758When called interactively, if variable `browse-url-new-window-p' is
759non-nil, load the document in a new browser window, otherwise use an
760existing one. A non-nil interactive prefix argument reverses the
761effect of `browse-url-new-window-p'.
762
763When called non-interactively, optional second argument NEW-WINDOW is
764used instead of `browse-url-new-window-p'."
765 (interactive (browse-url-interactive-arg "URL: "))
766 (apply 'start-process (concat "gnome-moz-remote " url)
767 nil
768 "gnome-moz-remote"
769 (append
770 browse-url-gnome-moz-arguments
771 (if (browse-url-maybe-new-window new-window)
772 '("--newwin"))
773 (list "--raise" url))))
774
746;; --- Mosaic --- 775;; --- Mosaic ---
747 776
748;;;###autoload 777;;;###autoload