aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-04-18 12:48:36 +0000
committerGerd Moellmann2001-04-18 12:48:36 +0000
commit408d5219eeea6d3922b58ec16ecac195a98a3928 (patch)
tree18f1ac5e3b0a0f57ca29ffb6e4c1907646e9735d
parentdaa66f34f79a4c169b7ee563bb40db032123871e (diff)
downloademacs-408d5219eeea6d3922b58ec16ecac195a98a3928.tar.gz
emacs-408d5219eeea6d3922b58ec16ecac195a98a3928.zip
(browse-url-new-window-flag): Renamed from
browse-url-new-window-p.
-rw-r--r--lisp/net/browse-url.el61
1 files changed, 31 insertions, 30 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index fba2938d44a..793ced385e3 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1,6 +1,7 @@
1;;; browse-url.el --- Pass a URL to a WWW browser 1;;; browse-url.el --- Pass a URL to a WWW browser
2 2
3;; Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. 3;; Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001
4;; Free Software Foundation, Inc.
4 5
5;; Author: Denis Howe <dbh@doc.ic.ac.uk> 6;; Author: Denis Howe <dbh@doc.ic.ac.uk>
6;; Maintainer: Dave Love <fx@gnu.org> 7;; Maintainer: Dave Love <fx@gnu.org>
@@ -297,7 +298,7 @@ Defaults to the value of `browse-url-netscape-arguments' at the time
297 :group 'browse-url) 298 :group 'browse-url)
298 299
299;;;###autoload 300;;;###autoload
300(defcustom browse-url-new-window-p nil 301(defcustom browse-url-new-window-flag nil
301 "*If non-nil, always open a new browser window with appropriate browsers. 302 "*If non-nil, always open a new browser window with appropriate browsers.
302Passing an interactive argument to \\[browse-url], or specific browser 303Passing an interactive argument to \\[browse-url], or specific browser
303commands reverses the effect of this variable. Requires Netscape version 304commands reverses the effect of this variable. Requires Netscape version
@@ -494,12 +495,12 @@ down (this *won't* always work)."
494 "Read a URL from the minibuffer, prompting with PROMPT. 495 "Read a URL from the minibuffer, prompting with PROMPT.
495Default to the URL at or before point. If invoked with a mouse button, 496Default to the URL at or before point. If invoked with a mouse button,
496set point to the position clicked first. Return a list for use in 497set point to the position clicked first. Return a list for use in
497`interactive' containing the URL and `browse-url-new-window-p' or its 498`interactive' containing the URL and `browse-url-new-window-flag' or its
498negation if a prefix argument was given." 499negation if a prefix argument was given."
499 (let ((event (elt (this-command-keys) 0))) 500 (let ((event (elt (this-command-keys) 0)))
500 (and (listp event) (mouse-set-point event))) 501 (and (listp event) (mouse-set-point event)))
501 (list (read-string prompt (browse-url-url-at-point)) 502 (list (read-string prompt (browse-url-url-at-point))
502 (not (eq (null browse-url-new-window-p) 503 (not (eq (null browse-url-new-window-flag)
503 (null current-prefix-arg))))) 504 (null current-prefix-arg)))))
504 505
505;; interactive-p needs to be called at a function's top-level, hence 506;; interactive-p needs to be called at a function's top-level, hence
@@ -507,7 +508,7 @@ negation if a prefix argument was given."
507(defmacro browse-url-maybe-new-window (arg) 508(defmacro browse-url-maybe-new-window (arg)
508 `(if (interactive-p) 509 `(if (interactive-p)
509 ,arg 510 ,arg
510 browse-url-new-window-p)) 511 browse-url-new-window-flag))
511 512
512;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 513;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
513;; Browse current buffer 514;; Browse current buffer
@@ -610,7 +611,7 @@ Prompts for a URL, defaulting to the URL at or before point. Variable
610`browse-url-browser-function' says which browser to use." 611`browse-url-browser-function' says which browser to use."
611 (interactive (browse-url-interactive-arg "URL: ")) 612 (interactive (browse-url-interactive-arg "URL: "))
612 (unless (interactive-p) 613 (unless (interactive-p)
613 (setq args (or args (list browse-url-new-window-p)))) 614 (setq args (or args (list browse-url-new-window-flag))))
614 (if (functionp browse-url-browser-function) 615 (if (functionp browse-url-browser-function)
615 (apply browse-url-browser-function url args) 616 (apply browse-url-browser-function url args)
616 ;; The `function' can be an alist; look down it for first match 617 ;; The `function' can be an alist; look down it for first match
@@ -632,8 +633,8 @@ Doesn't let you edit the URL like `browse-url'. Variable
632 (let ((url (browse-url-url-at-point))) 633 (let ((url (browse-url-url-at-point)))
633 (if url 634 (if url
634 (browse-url url (if arg 635 (browse-url url (if arg
635 (not browse-url-new-window-p) 636 (not browse-url-new-window-flag)
636 browse-url-new-window-p)) 637 browse-url-new-window-flag))
637 (error "No URL found")))) 638 (error "No URL found"))))
638 639
639;;;###autoload 640;;;###autoload
@@ -646,7 +647,7 @@ to use."
646 (interactive "e") 647 (interactive "e")
647 (save-excursion 648 (save-excursion
648 (mouse-set-point event) 649 (mouse-set-point event)
649 (browse-url-at-point browse-url-new-window-p))) 650 (browse-url-at-point browse-url-new-window-flag)))
650 651
651;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 652;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
652;; Browser-specific commands 653;; Browser-specific commands
@@ -685,13 +686,13 @@ one showing the selected frame."
685Default to the URL around or before point. The strings in variable 686Default to the URL around or before point. The strings in variable
686`browse-url-netscape-arguments' are also passed to Netscape. 687`browse-url-netscape-arguments' are also passed to Netscape.
687 688
688When called interactively, if variable `browse-url-new-window-p' is 689When called interactively, if variable `browse-url-new-window-flag' is
689non-nil, load the document in a new Netscape window, otherwise use a 690non-nil, load the document in a new Netscape window, otherwise use a
690random existing one. A non-nil interactive prefix argument reverses 691random existing one. A non-nil interactive prefix argument reverses
691the effect of `browse-url-new-window-p'. 692the effect of `browse-url-new-window-flag'.
692 693
693When called non-interactively, optional second argument NEW-WINDOW is 694When called non-interactively, optional second argument NEW-WINDOW is
694used instead of `browse-url-new-window-p'." 695used instead of `browse-url-new-window-flag'."
695 (interactive (browse-url-interactive-arg "URL: ")) 696 (interactive (browse-url-interactive-arg "URL: "))
696 ;; URL encode any `confusing' characters in the URL. This needs to 697 ;; URL encode any `confusing' characters in the URL. This needs to
697 ;; include at least commas; presumably also close parens. 698 ;; include at least commas; presumably also close parens.
@@ -760,13 +761,13 @@ How depends on `browse-url-netscape-version'."
760Default to the URL around or before point. The strings in variable 761Default to the URL around or before point. The strings in variable
761`browse-url-gnome-moz-arguments' are also passed. 762`browse-url-gnome-moz-arguments' are also passed.
762 763
763When called interactively, if variable `browse-url-new-window-p' is 764When called interactively, if variable `browse-url-new-window-flag' is
764non-nil, load the document in a new browser window, otherwise use an 765non-nil, load the document in a new browser window, otherwise use an
765existing one. A non-nil interactive prefix argument reverses the 766existing one. A non-nil interactive prefix argument reverses the
766effect of `browse-url-new-window-p'. 767effect of `browse-url-new-window-flag'.
767 768
768When called non-interactively, optional second argument NEW-WINDOW is 769When called non-interactively, optional second argument NEW-WINDOW is
769used instead of `browse-url-new-window-p'." 770used instead of `browse-url-new-window-flag'."
770 (interactive (browse-url-interactive-arg "URL: ")) 771 (interactive (browse-url-interactive-arg "URL: "))
771 (apply 'start-process (concat "gnome-moz-remote " url) 772 (apply 'start-process (concat "gnome-moz-remote " url)
772 nil 773 nil
@@ -788,13 +789,13 @@ Default to the URL around or before point. The strings in variable
788program is invoked according to the variable 789program is invoked according to the variable
789`browse-url-mosaic-program'. 790`browse-url-mosaic-program'.
790 791
791When called interactively, if variable `browse-url-new-window-p' is 792When called interactively, if variable `browse-url-new-window-flag' is
792non-nil, load the document in a new Mosaic window, otherwise use a 793non-nil, load the document in a new Mosaic window, otherwise use a
793random existing one. A non-nil interactive prefix argument reverses 794random existing one. A non-nil interactive prefix argument reverses
794the effect of `browse-url-new-window-p'. 795the effect of `browse-url-new-window-flag'.
795 796
796When called non-interactively, optional second argument NEW-WINDOW is 797When called non-interactively, optional second argument NEW-WINDOW is
797used instead of `browse-url-new-window-p'." 798used instead of `browse-url-new-window-flag'."
798 (interactive (browse-url-interactive-arg "Mosaic URL: ")) 799 (interactive (browse-url-interactive-arg "Mosaic URL: "))
799 (let ((pidfile (expand-file-name "~/.mosaicpid")) 800 (let ((pidfile (expand-file-name "~/.mosaicpid"))
800 pid) 801 pid)
@@ -862,13 +863,13 @@ This function only works for XMosaic version 2.5 or later. You must
862select `CCI' from XMosaic's File menu, set the CCI Port Address to the 863select `CCI' from XMosaic's File menu, set the CCI Port Address to the
863value of variable `browse-url-CCI-port', and enable `Accept requests'. 864value of variable `browse-url-CCI-port', and enable `Accept requests'.
864 865
865When called interactively, if variable `browse-url-new-window-p' is 866When called interactively, if variable `browse-url-new-window-flag' is
866non-nil, load the document in a new browser window, otherwise use a 867non-nil, load the document in a new browser window, otherwise use a
867random existing one. A non-nil interactive prefix argument reverses 868random existing one. A non-nil interactive prefix argument reverses
868the effect of `browse-url-new-window-p'. 869the effect of `browse-url-new-window-flag'.
869 870
870When called non-interactively, optional second argument NEW-WINDOW is 871When called non-interactively, optional second argument NEW-WINDOW is
871used instead of `browse-url-new-window-p'." 872used instead of `browse-url-new-window-flag'."
872 (interactive (browse-url-interactive-arg "Mosaic URL: ")) 873 (interactive (browse-url-interactive-arg "Mosaic URL: "))
873 (open-network-stream "browse-url" " *browse-url*" 874 (open-network-stream "browse-url" " *browse-url*"
874 browse-url-CCI-host browse-url-CCI-port) 875 browse-url-CCI-host browse-url-CCI-port)
@@ -900,12 +901,12 @@ Default to the URL around or before point."
900 "Ask the w3 WWW browser to load URL. 901 "Ask the w3 WWW browser to load URL.
901Default to the URL around or before point. 902Default to the URL around or before point.
902 903
903When called interactively, if variable `browse-url-new-window-p' is 904When called interactively, if variable `browse-url-new-window-flag' is
904non-nil, load the document in a new window. A non-nil interactive 905non-nil, load the document in a new window. A non-nil interactive
905prefix argument reverses the effect of `browse-url-new-window-p'. 906prefix argument reverses the effect of `browse-url-new-window-flag'.
906 907
907When called non-interactively, optional second argument NEW-WINDOW is 908When called non-interactively, optional second argument NEW-WINDOW is
908used instead of `browse-url-new-window-p'." 909used instead of `browse-url-new-window-flag'."
909 (interactive (browse-url-interactive-arg "W3 URL: ")) 910 (interactive (browse-url-interactive-arg "W3 URL: "))
910 (require 'w3) ; w3-fetch-other-window not autoloaded 911 (require 'w3) ; w3-fetch-other-window not autoloaded
911 (if (browse-url-maybe-new-window new-window) 912 (if (browse-url-maybe-new-window new-window)
@@ -947,13 +948,13 @@ with possible additional arguments `browse-url-xterm-args'."
947Default to the URL around or before point. With a prefix argument, run 948Default to the URL around or before point. With a prefix argument, run
948a new Lynx process in a new buffer. 949a new Lynx process in a new buffer.
949 950
950When called interactively, if variable `browse-url-new-window-p' is 951When called interactively, if variable `browse-url-new-window-flag' is
951non-nil, load the document in a new lynx in a new term window, 952non-nil, load the document in a new lynx in a new term window,
952otherwise use any existing one. A non-nil interactive prefix argument 953otherwise use any existing one. A non-nil interactive prefix argument
953reverses the effect of `browse-url-new-window-p'. 954reverses the effect of `browse-url-new-window-flag'.
954 955
955When called non-interactively, optional second argument NEW-WINDOW is 956When called non-interactively, optional second argument NEW-WINDOW is
956used instead of `browse-url-new-window-p'." 957used instead of `browse-url-new-window-flag'."
957 (interactive (browse-url-interactive-arg "Lynx URL: ")) 958 (interactive (browse-url-interactive-arg "Lynx URL: "))
958 (let* ((system-uses-terminfo t) ; Lynx uses terminfo 959 (let* ((system-uses-terminfo t) ; Lynx uses terminfo
959 ;; (term-term-name "vt100") ; ?? 960 ;; (term-term-name "vt100") ; ??
@@ -1034,13 +1035,13 @@ recipient's address. Supplying a non-nil interactive prefix argument
1034will cause the mail to be composed in another window rather than the 1035will cause the mail to be composed in another window rather than the
1035current one. 1036current one.
1036 1037
1037When called interactively, if variable `browse-url-new-window-p' is 1038When called interactively, if variable `browse-url-new-window-flag' is
1038non-nil use `compose-mail-other-window', otherwise `compose-mail'. A 1039non-nil use `compose-mail-other-window', otherwise `compose-mail'. A
1039non-nil interactive prefix argument reverses the effect of 1040non-nil interactive prefix argument reverses the effect of
1040`browse-url-new-window-p'. 1041`browse-url-new-window-flag'.
1041 1042
1042When called non-interactively, optional second argument NEW-WINDOW is 1043When called non-interactively, optional second argument NEW-WINDOW is
1043used instead of `browse-url-new-window-p'." 1044used instead of `browse-url-new-window-flag'."
1044 (interactive (browse-url-interactive-arg "Mailto URL: ")) 1045 (interactive (browse-url-interactive-arg "Mailto URL: "))
1045 (save-excursion 1046 (save-excursion
1046 (let ((to (if (string-match "^mailto:" url) 1047 (let ((to (if (string-match "^mailto:" url)