diff options
| author | Dave Love | 1999-01-19 19:57:33 +0000 |
|---|---|---|
| committer | Dave Love | 1999-01-19 19:57:33 +0000 |
| commit | 15eff622561b4ceda3108159ed6791d777bc3d5d (patch) | |
| tree | 8a10eff4a2d257aeded40354263584285d9fa34b | |
| parent | 6fd849f6b0d1b2394e664b21543fc58fd527955b (diff) | |
| download | emacs-15eff622561b4ceda3108159ed6791d777bc3d5d.tar.gz emacs-15eff622561b4ceda3108159ed6791d777bc3d5d.zip | |
(browse-url-maybe-new-window): Delete macro and
its uses.
| -rw-r--r-- | lisp/browse-url.el | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/lisp/browse-url.el b/lisp/browse-url.el index cc63b39c7bd..28e03b11b75 100644 --- a/lisp/browse-url.el +++ b/lisp/browse-url.el | |||
| @@ -492,13 +492,6 @@ negation if a prefix argument was given." | |||
| 492 | (not (eq (null browse-url-new-window-p) | 492 | (not (eq (null browse-url-new-window-p) |
| 493 | (null current-prefix-arg))))) | 493 | (null current-prefix-arg))))) |
| 494 | 494 | ||
| 495 | ;; interactive-p needs to be called at a function's top-level, hence | ||
| 496 | ;; the macro. | ||
| 497 | (defmacro browse-url-maybe-new-window (arg) | ||
| 498 | `(if (interactive-p) | ||
| 499 | 'arg | ||
| 500 | browse-url-new-window-p)) | ||
| 501 | |||
| 502 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 495 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 503 | ;; Browse current buffer | 496 | ;; Browse current buffer |
| 504 | 497 | ||
| @@ -717,9 +710,7 @@ used instead of `browse-url-new-window-p'." | |||
| 717 | (if new-window '("-noraise")) | 710 | (if new-window '("-noraise")) |
| 718 | (list "-remote" | 711 | (list "-remote" |
| 719 | (concat "openURL(" url | 712 | (concat "openURL(" url |
| 720 | (if (browse-url-maybe-new-window | 713 | (if new-window ",new-window") |
| 721 | new-window) | ||
| 722 | ",new-window") | ||
| 723 | ")")))))))) | 714 | ")")))))))) |
| 724 | (set-process-sentinel process | 715 | (set-process-sentinel process |
| 725 | (list 'lambda '(process change) | 716 | (list 'lambda '(process change) |
| @@ -757,7 +748,6 @@ How depends on `browse-url-netscape-version'." | |||
| 757 | 748 | ||
| 758 | ;;;###autoload | 749 | ;;;###autoload |
| 759 | (defun browse-url-mosaic (url &optional new-window) | 750 | (defun browse-url-mosaic (url &optional new-window) |
| 760 | ;; new-window ignored | ||
| 761 | "Ask the XMosaic WWW browser to load URL. | 751 | "Ask the XMosaic WWW browser to load URL. |
| 762 | 752 | ||
| 763 | Default to the URL around or before point. The strings in variable | 753 | Default to the URL around or before point. The strings in variable |
| @@ -785,9 +775,9 @@ used instead of `browse-url-new-window-p'." | |||
| 785 | (save-excursion | 775 | (save-excursion |
| 786 | (find-file (format "/tmp/Mosaic.%d" pid)) | 776 | (find-file (format "/tmp/Mosaic.%d" pid)) |
| 787 | (erase-buffer) | 777 | (erase-buffer) |
| 788 | (insert (if (browse-url-maybe-new-window new-window) | 778 | (insert (if new-window |
| 789 | "newwin\n" | 779 | "newwin\n" |
| 790 | "goto\n") | 780 | "goto\n") |
| 791 | url "\n") | 781 | url "\n") |
| 792 | (save-buffer) | 782 | (save-buffer) |
| 793 | (kill-buffer nil) | 783 | (kill-buffer nil) |
| @@ -852,7 +842,7 @@ used instead of `browse-url-new-window-p'." | |||
| 852 | ;; Todo: start browser if fails | 842 | ;; Todo: start browser if fails |
| 853 | (process-send-string "browse-url" | 843 | (process-send-string "browse-url" |
| 854 | (concat "get url (" url ") output " | 844 | (concat "get url (" url ") output " |
| 855 | (if (browse-url-maybe-new-window new-window) | 845 | (if new-window |
| 856 | "new" | 846 | "new" |
| 857 | "current") | 847 | "current") |
| 858 | "\r\n")) | 848 | "\r\n")) |
| @@ -885,7 +875,7 @@ When called non-interactively, optional second argument NEW-WINDOW is | |||
| 885 | used instead of `browse-url-new-window-p'." | 875 | used instead of `browse-url-new-window-p'." |
| 886 | (interactive (browse-url-interactive-arg "W3 URL: ")) | 876 | (interactive (browse-url-interactive-arg "W3 URL: ")) |
| 887 | (require 'w3) ; w3-fetch-other-window not autoloaded | 877 | (require 'w3) ; w3-fetch-other-window not autoloaded |
| 888 | (if (browse-url-maybe-new-window new-window) | 878 | (if new-window |
| 889 | (w3-fetch-other-window url) | 879 | (w3-fetch-other-window url) |
| 890 | (w3-fetch url))) | 880 | (w3-fetch url))) |
| 891 | 881 | ||
| @@ -934,13 +924,13 @@ used instead of `browse-url-new-window-p'." | |||
| 934 | (buf (get-buffer "*lynx*")) | 924 | (buf (get-buffer "*lynx*")) |
| 935 | (proc (and buf (get-buffer-process buf))) | 925 | (proc (and buf (get-buffer-process buf))) |
| 936 | (n browse-url-lynx-input-attempts)) | 926 | (n browse-url-lynx-input-attempts)) |
| 937 | (if (and (browse-url-maybe-new-window new-buffer) buf) | 927 | (if (and new-buffer buf) |
| 938 | ;; Rename away the OLD buffer. This isn't very polite, but | 928 | ;; Rename away the OLD buffer. This isn't very polite, but |
| 939 | ;; term insists on working in a buffer named *lynx* and would | 929 | ;; term insists on working in a buffer named *lynx* and would |
| 940 | ;; choke on *lynx*<1> | 930 | ;; choke on *lynx*<1> |
| 941 | (progn (set-buffer buf) | 931 | (progn (set-buffer buf) |
| 942 | (rename-uniquely))) | 932 | (rename-uniquely))) |
| 943 | (if (or (browse-url-maybe-new-window new-buffer) | 933 | (if (or new-buffer |
| 944 | (not buf) | 934 | (not buf) |
| 945 | (not proc) | 935 | (not proc) |
| 946 | (not (memq (process-status proc) '(run stop)))) | 936 | (not (memq (process-status proc) '(run stop)))) |
| @@ -1019,7 +1009,7 @@ used instead of `browse-url-new-window-p'." | |||
| 1019 | (let ((to (if (string-match "^mailto:" url) | 1009 | (let ((to (if (string-match "^mailto:" url) |
| 1020 | (substring url 7) | 1010 | (substring url 7) |
| 1021 | url))) | 1011 | url))) |
| 1022 | (if (browse-url-maybe-new-window new-window) | 1012 | (if new-window |
| 1023 | (compose-mail-other-window to nil nil nil | 1013 | (compose-mail-other-window to nil nil nil |
| 1024 | (list 'insert-buffer (current-buffer))) | 1014 | (list 'insert-buffer (current-buffer))) |
| 1025 | (compose-mail to nil nil nil nil | 1015 | (compose-mail to nil nil nil nil |