aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/net/browse-url.el36
2 files changed, 35 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6c362187e16..f2bf55ad6ed 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12002-10-10 Simon Josefsson <jas@extundo.com>
2
3 * browse-url.el (browse-url-mozilla): Doc fix.
4
52002-10-10 Steve Youngs <youngs@xemacs.org>
6
7 * browse-url.el (browse-url-mozilla-new-window-is-tab): New.
8 (browse-url-mozilla): Use it.
9
12002-10-11 Miles Bader <miles@gnu.org> 102002-10-11 Miles Bader <miles@gnu.org>
2 11
3 * vc-cvs.el (vc-cvs-parse-entry): Don't barf when an `Entries' 12 * vc-cvs.el (vc-cvs-parse-entry): Don't barf when an `Entries'
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index cdda3ef98d7..8c2d4477df4 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -335,6 +335,13 @@ Defaults to the value of `browse-url-galeon-arguments' at the time
335 :type '(repeat (string :tag "Argument")) 335 :type '(repeat (string :tag "Argument"))
336 :group 'browse-url) 336 :group 'browse-url)
337 337
338(defcustom browse-url-mozilla-new-window-is-tab nil
339 "*Whether to open up new windows in a tab or a new window.
340If non-nil, then open the URL in a new tab rather than a new window if
341`browse-url-mozilla' is asked to open it in a new window."
342 :type 'boolean
343 :group 'browse-url)
344
338(defcustom browse-url-galeon-new-window-is-tab nil 345(defcustom browse-url-galeon-new-window-is-tab nil
339 "*Whether to open up new windows in a tab or a new window. 346 "*Whether to open up new windows in a tab or a new window.
340If non-nil, then open the URL in a new tab rather than a new window if 347If non-nil, then open the URL in a new tab rather than a new window if
@@ -853,6 +860,10 @@ non-nil, load the document in a new Mozilla window, otherwise use a
853random existing one. A non-nil interactive prefix argument reverses 860random existing one. A non-nil interactive prefix argument reverses
854the effect of `browse-url-new-window-flag'. 861the effect of `browse-url-new-window-flag'.
855 862
863If `browse-url-mozilla-new-window-is-tab' is non-nil, then whenever a
864document would otherwise be loaded in a new window, it is loaded in a
865new tab in an existing window instead.
866
856When called non-interactively, optional second argument NEW-WINDOW is 867When called non-interactively, optional second argument NEW-WINDOW is
857used instead of `browse-url-new-window-flag'." 868used instead of `browse-url-new-window-flag'."
858 (interactive (browse-url-interactive-arg "URL: ")) 869 (interactive (browse-url-interactive-arg "URL: "))
@@ -862,16 +873,21 @@ used instead of `browse-url-new-window-flag'."
862 (setq url (replace-match 873 (setq url (replace-match
863 (format "%%%x" (string-to-char (match-string 0 url))) t t url))) 874 (format "%%%x" (string-to-char (match-string 0 url))) t t url)))
864 (let* ((process-environment (browse-url-process-environment)) 875 (let* ((process-environment (browse-url-process-environment))
865 (process (apply 'start-process 876 (process
866 (concat "mozilla " url) nil 877 (apply 'start-process
867 browse-url-mozilla-program 878 (concat "mozilla " url) nil
868 (append 879 browse-url-mozilla-program
869 browse-url-mozilla-arguments 880 (append
870 (list "-remote" 881 browse-url-mozilla-arguments
871 (concat "openURL(" 882 (list "-remote"
872 url 883 (concat "openURL("
873 (if new-window ",new-window") 884 url
874 ")")))))) 885 (if (browse-url-maybe-new-window
886 new-window)
887 (if browse-url-mozilla-new-window-is-tab
888 ",new-tab")
889 ",new-window")
890 ")"))))))
875 (set-process-sentinel process 891 (set-process-sentinel process
876 `(lambda (process change) 892 `(lambda (process change)
877 (browse-url-mozilla-sentinel process ,url))))) 893 (browse-url-mozilla-sentinel process ,url)))))