diff options
| author | Gerd Moellmann | 2001-04-18 12:48:36 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-04-18 12:48:36 +0000 |
| commit | 408d5219eeea6d3922b58ec16ecac195a98a3928 (patch) | |
| tree | 18f1ac5e3b0a0f57ca29ffb6e4c1907646e9735d | |
| parent | daa66f34f79a4c169b7ee563bb40db032123871e (diff) | |
| download | emacs-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.el | 61 |
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. |
| 302 | Passing an interactive argument to \\[browse-url], or specific browser | 303 | Passing an interactive argument to \\[browse-url], or specific browser |
| 303 | commands reverses the effect of this variable. Requires Netscape version | 304 | commands 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. |
| 495 | Default to the URL at or before point. If invoked with a mouse button, | 496 | Default to the URL at or before point. If invoked with a mouse button, |
| 496 | set point to the position clicked first. Return a list for use in | 497 | set 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 |
| 498 | negation if a prefix argument was given." | 499 | negation 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." | |||
| 685 | Default to the URL around or before point. The strings in variable | 686 | Default 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 | ||
| 688 | When called interactively, if variable `browse-url-new-window-p' is | 689 | When called interactively, if variable `browse-url-new-window-flag' is |
| 689 | non-nil, load the document in a new Netscape window, otherwise use a | 690 | non-nil, load the document in a new Netscape window, otherwise use a |
| 690 | random existing one. A non-nil interactive prefix argument reverses | 691 | random existing one. A non-nil interactive prefix argument reverses |
| 691 | the effect of `browse-url-new-window-p'. | 692 | the effect of `browse-url-new-window-flag'. |
| 692 | 693 | ||
| 693 | When called non-interactively, optional second argument NEW-WINDOW is | 694 | When called non-interactively, optional second argument NEW-WINDOW is |
| 694 | used instead of `browse-url-new-window-p'." | 695 | used 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'." | |||
| 760 | Default to the URL around or before point. The strings in variable | 761 | Default 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 | ||
| 763 | When called interactively, if variable `browse-url-new-window-p' is | 764 | When called interactively, if variable `browse-url-new-window-flag' is |
| 764 | non-nil, load the document in a new browser window, otherwise use an | 765 | non-nil, load the document in a new browser window, otherwise use an |
| 765 | existing one. A non-nil interactive prefix argument reverses the | 766 | existing one. A non-nil interactive prefix argument reverses the |
| 766 | effect of `browse-url-new-window-p'. | 767 | effect of `browse-url-new-window-flag'. |
| 767 | 768 | ||
| 768 | When called non-interactively, optional second argument NEW-WINDOW is | 769 | When called non-interactively, optional second argument NEW-WINDOW is |
| 769 | used instead of `browse-url-new-window-p'." | 770 | used 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 | |||
| 788 | program is invoked according to the variable | 789 | program is invoked according to the variable |
| 789 | `browse-url-mosaic-program'. | 790 | `browse-url-mosaic-program'. |
| 790 | 791 | ||
| 791 | When called interactively, if variable `browse-url-new-window-p' is | 792 | When called interactively, if variable `browse-url-new-window-flag' is |
| 792 | non-nil, load the document in a new Mosaic window, otherwise use a | 793 | non-nil, load the document in a new Mosaic window, otherwise use a |
| 793 | random existing one. A non-nil interactive prefix argument reverses | 794 | random existing one. A non-nil interactive prefix argument reverses |
| 794 | the effect of `browse-url-new-window-p'. | 795 | the effect of `browse-url-new-window-flag'. |
| 795 | 796 | ||
| 796 | When called non-interactively, optional second argument NEW-WINDOW is | 797 | When called non-interactively, optional second argument NEW-WINDOW is |
| 797 | used instead of `browse-url-new-window-p'." | 798 | used 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 | |||
| 862 | select `CCI' from XMosaic's File menu, set the CCI Port Address to the | 863 | select `CCI' from XMosaic's File menu, set the CCI Port Address to the |
| 863 | value of variable `browse-url-CCI-port', and enable `Accept requests'. | 864 | value of variable `browse-url-CCI-port', and enable `Accept requests'. |
| 864 | 865 | ||
| 865 | When called interactively, if variable `browse-url-new-window-p' is | 866 | When called interactively, if variable `browse-url-new-window-flag' is |
| 866 | non-nil, load the document in a new browser window, otherwise use a | 867 | non-nil, load the document in a new browser window, otherwise use a |
| 867 | random existing one. A non-nil interactive prefix argument reverses | 868 | random existing one. A non-nil interactive prefix argument reverses |
| 868 | the effect of `browse-url-new-window-p'. | 869 | the effect of `browse-url-new-window-flag'. |
| 869 | 870 | ||
| 870 | When called non-interactively, optional second argument NEW-WINDOW is | 871 | When called non-interactively, optional second argument NEW-WINDOW is |
| 871 | used instead of `browse-url-new-window-p'." | 872 | used 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. |
| 901 | Default to the URL around or before point. | 902 | Default to the URL around or before point. |
| 902 | 903 | ||
| 903 | When called interactively, if variable `browse-url-new-window-p' is | 904 | When called interactively, if variable `browse-url-new-window-flag' is |
| 904 | non-nil, load the document in a new window. A non-nil interactive | 905 | non-nil, load the document in a new window. A non-nil interactive |
| 905 | prefix argument reverses the effect of `browse-url-new-window-p'. | 906 | prefix argument reverses the effect of `browse-url-new-window-flag'. |
| 906 | 907 | ||
| 907 | When called non-interactively, optional second argument NEW-WINDOW is | 908 | When called non-interactively, optional second argument NEW-WINDOW is |
| 908 | used instead of `browse-url-new-window-p'." | 909 | used 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'." | |||
| 947 | Default to the URL around or before point. With a prefix argument, run | 948 | Default to the URL around or before point. With a prefix argument, run |
| 948 | a new Lynx process in a new buffer. | 949 | a new Lynx process in a new buffer. |
| 949 | 950 | ||
| 950 | When called interactively, if variable `browse-url-new-window-p' is | 951 | When called interactively, if variable `browse-url-new-window-flag' is |
| 951 | non-nil, load the document in a new lynx in a new term window, | 952 | non-nil, load the document in a new lynx in a new term window, |
| 952 | otherwise use any existing one. A non-nil interactive prefix argument | 953 | otherwise use any existing one. A non-nil interactive prefix argument |
| 953 | reverses the effect of `browse-url-new-window-p'. | 954 | reverses the effect of `browse-url-new-window-flag'. |
| 954 | 955 | ||
| 955 | When called non-interactively, optional second argument NEW-WINDOW is | 956 | When called non-interactively, optional second argument NEW-WINDOW is |
| 956 | used instead of `browse-url-new-window-p'." | 957 | used 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 | |||
| 1034 | will cause the mail to be composed in another window rather than the | 1035 | will cause the mail to be composed in another window rather than the |
| 1035 | current one. | 1036 | current one. |
| 1036 | 1037 | ||
| 1037 | When called interactively, if variable `browse-url-new-window-p' is | 1038 | When called interactively, if variable `browse-url-new-window-flag' is |
| 1038 | non-nil use `compose-mail-other-window', otherwise `compose-mail'. A | 1039 | non-nil use `compose-mail-other-window', otherwise `compose-mail'. A |
| 1039 | non-nil interactive prefix argument reverses the effect of | 1040 | non-nil interactive prefix argument reverses the effect of |
| 1040 | `browse-url-new-window-p'. | 1041 | `browse-url-new-window-flag'. |
| 1041 | 1042 | ||
| 1042 | When called non-interactively, optional second argument NEW-WINDOW is | 1043 | When called non-interactively, optional second argument NEW-WINDOW is |
| 1043 | used instead of `browse-url-new-window-p'." | 1044 | used 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) |