diff options
| author | Dave Love | 1998-12-09 16:53:34 +0000 |
|---|---|---|
| committer | Dave Love | 1998-12-09 16:53:34 +0000 |
| commit | 685a6f2e86094750e1bb440d5cf4d4c315f5a4dd (patch) | |
| tree | dccd2e3bf458a7641badb27bd5f4372eeb59fd48 | |
| parent | bd6cabcf14906e3ca108e914702715aa35288d4b (diff) | |
| download | emacs-685a6f2e86094750e1bb440d5cf4d4c315f5a4dd.tar.gz emacs-685a6f2e86094750e1bb440d5cf4d4c315f5a4dd.zip | |
(browse-url-mail): Call compose-mail-other-window
with correct number of args.
(browse-url-maybe-new-window): New arg. Callers changed.
| -rw-r--r-- | lisp/browse-url.el | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/lisp/browse-url.el b/lisp/browse-url.el index 68f09f8440b..219378c1b52 100644 --- a/lisp/browse-url.el +++ b/lisp/browse-url.el | |||
| @@ -491,8 +491,8 @@ negation if a prefix argument was given." | |||
| 491 | (not (eq (null browse-url-new-window-p) | 491 | (not (eq (null browse-url-new-window-p) |
| 492 | (null current-prefix-arg))))) | 492 | (null current-prefix-arg))))) |
| 493 | 493 | ||
| 494 | (defun browse-url-maybe-new-window (arg) | 494 | (defun browse-url-maybe-new-window (arg interactive) |
| 495 | (if (interactive-p) | 495 | (if interactive |
| 496 | arg | 496 | arg |
| 497 | browse-url-new-window-p)) | 497 | browse-url-new-window-p)) |
| 498 | 498 | ||
| @@ -713,7 +713,7 @@ used instead of `browse-url-new-window-p'." | |||
| 713 | (list "-remote" | 713 | (list "-remote" |
| 714 | (concat "openURL(" url | 714 | (concat "openURL(" url |
| 715 | (if (browse-url-maybe-new-window | 715 | (if (browse-url-maybe-new-window |
| 716 | new-window) | 716 | new-window (interactive-p)) |
| 717 | ",new-window") | 717 | ",new-window") |
| 718 | ")"))))))) | 718 | ")"))))))) |
| 719 | (set-process-sentinel process | 719 | (set-process-sentinel process |
| @@ -780,7 +780,7 @@ used instead of `browse-url-new-window-p'." | |||
| 780 | (save-excursion | 780 | (save-excursion |
| 781 | (find-file (format "/tmp/Mosaic.%d" pid)) | 781 | (find-file (format "/tmp/Mosaic.%d" pid)) |
| 782 | (erase-buffer) | 782 | (erase-buffer) |
| 783 | (insert (if (browse-url-maybe-new-window new-window) | 783 | (insert (if (browse-url-maybe-new-window new-window (interactive-p)) |
| 784 | "newwin\n" | 784 | "newwin\n" |
| 785 | "goto\n") | 785 | "goto\n") |
| 786 | url "\n") | 786 | url "\n") |
| @@ -848,7 +848,7 @@ used instead of `browse-url-new-window-p'." | |||
| 848 | (process-send-string "browse-url" | 848 | (process-send-string "browse-url" |
| 849 | (concat "get url (" url ") output " | 849 | (concat "get url (" url ") output " |
| 850 | (if (browse-url-maybe-new-window | 850 | (if (browse-url-maybe-new-window |
| 851 | new-window) | 851 | new-window (interactive-p)) |
| 852 | "new" | 852 | "new" |
| 853 | "current") | 853 | "current") |
| 854 | "\r\n")) | 854 | "\r\n")) |
| @@ -880,7 +880,7 @@ prefix argument reverses the effect of `browse-url-new-window-p'. | |||
| 880 | When called non-interactively, optional second argument NEW-WINDOW is | 880 | When called non-interactively, optional second argument NEW-WINDOW is |
| 881 | used instead of `browse-url-new-window-p'." | 881 | used instead of `browse-url-new-window-p'." |
| 882 | (interactive (browse-url-interactive-arg "W3 URL: ")) | 882 | (interactive (browse-url-interactive-arg "W3 URL: ")) |
| 883 | (if (browse-url-maybe-new-window new-window) | 883 | (if (browse-url-maybe-new-window new-window (interactive-p)) |
| 884 | (w3-fetch-other-window) | 884 | (w3-fetch-other-window) |
| 885 | (w3-fetch url))) | 885 | (w3-fetch url))) |
| 886 | 886 | ||
| @@ -929,13 +929,13 @@ used instead of `browse-url-new-window-p'." | |||
| 929 | (buf (get-buffer "*lynx*")) | 929 | (buf (get-buffer "*lynx*")) |
| 930 | (proc (and buf (get-buffer-process buf))) | 930 | (proc (and buf (get-buffer-process buf))) |
| 931 | (n browse-url-lynx-input-attempts)) | 931 | (n browse-url-lynx-input-attempts)) |
| 932 | (if (and (browse-url-maybe-new-window new-buffer) buf) | 932 | (if (and (browse-url-maybe-new-window new-buffer (interactive-p)) buf) |
| 933 | ;; Rename away the OLD buffer. This isn't very polite, but | 933 | ;; Rename away the OLD buffer. This isn't very polite, but |
| 934 | ;; term insists on working in a buffer named *lynx* and would | 934 | ;; term insists on working in a buffer named *lynx* and would |
| 935 | ;; choke on *lynx*<1> | 935 | ;; choke on *lynx*<1> |
| 936 | (progn (set-buffer buf) | 936 | (progn (set-buffer buf) |
| 937 | (rename-uniquely))) | 937 | (rename-uniquely))) |
| 938 | (if (or (browse-url-maybe-new-window new-buffer) | 938 | (if (or (browse-url-maybe-new-window new-buffer (interactive-p)) |
| 939 | (not buf) | 939 | (not buf) |
| 940 | (not proc) | 940 | (not proc) |
| 941 | (not (memq (process-status proc) '(run stop)))) | 941 | (not (memq (process-status proc) '(run stop)))) |
| @@ -1011,15 +1011,14 @@ When called non-interactively, optional second argument NEW-WINDOW is | |||
| 1011 | used instead of `browse-url-new-window-p'." | 1011 | used instead of `browse-url-new-window-p'." |
| 1012 | (interactive (browse-url-interactive-arg "Mailto URL: ")) | 1012 | (interactive (browse-url-interactive-arg "Mailto URL: ")) |
| 1013 | (save-excursion | 1013 | (save-excursion |
| 1014 | (let ((func (if (browse-url-maybe-new-window new-window) | 1014 | (let ((to (if (string-match "^mailto:" url) |
| 1015 | 'compose-mail-other-window | ||
| 1016 | 'compose-mail)) | ||
| 1017 | (to (if (string-match "^mailto:" url) | ||
| 1018 | (substring url 7) | 1015 | (substring url 7) |
| 1019 | url))) | 1016 | url))) |
| 1020 | (apply func | 1017 | (if (browse-url-maybe-new-window new-window (interactive-p)) |
| 1021 | (list to nil nil nil nil nil (cons 'insert-buffer | 1018 | (compose-mail-other-window to nil nil nil nil |
| 1022 | (current-buffer))))))) | 1019 | (cons 'insert-buffer (current-buffer))) |
| 1020 | (compose-mail to nil nil nil nil nil (cons 'insert-buffer | ||
| 1021 | (current-buffer))))))) | ||
| 1023 | 1022 | ||
| 1024 | ;; --- Random browser --- | 1023 | ;; --- Random browser --- |
| 1025 | 1024 | ||