aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-27 21:20:47 +0000
committerRichard M. Stallman1997-08-27 21:20:47 +0000
commit59966fb622614968b5faf8a006e2641772a628ba (patch)
treec04a9b2e6ed3a9a7d61d80b5c573755a7c39dcee
parentbd25266244d48e7a7254a8e5f3b893b13002a564 (diff)
downloademacs-59966fb622614968b5faf8a006e2641772a628ba.tar.gz
emacs-59966fb622614968b5faf8a006e2641772a628ba.zip
(browse-url-mail): Use compose-mail[-other-window], not always `mail'.
-rw-r--r--lisp/browse-url.el31
1 files changed, 23 insertions, 8 deletions
diff --git a/lisp/browse-url.el b/lisp/browse-url.el
index df5a04a0f25..2a53337cbe9 100644
--- a/lisp/browse-url.el
+++ b/lisp/browse-url.el
@@ -101,11 +101,17 @@
101;; <URL:ftp://sig.enst.fr/pub/multicast/mMosaic/> (the latter with 101;; <URL:ftp://sig.enst.fr/pub/multicast/mMosaic/> (the latter with
102;; development support for Java applets). 102;; development support for Java applets).
103 103
104;; I recommend Nelson Minar <nelson@santafe.edu>'s excellent 104;; I [Denis Howe] recommend Nelson Minar <nelson@santafe.edu>'s excellent
105;; html-helper-mode.el for editing HTML and thank Nelson for 105;; html-helper-mode.el for editing HTML and thank Nelson for
106;; his many useful comments on this code. 106;; his many useful comments on this code.
107;; <URL:http://www.santafe.edu/%7Enelson/hhm-beta/> 107;; <URL:http://www.santafe.edu/%7Enelson/hhm-beta/>
108 108
109;; See also hm--html-menus <URL:http://www.tnt.uni-hannover.de/%7Emuenkel/
110;; software/own/hm--html-menus/>. For composing correct HTML see also
111;; PSGML the general SGML structure editor package
112;; <URL:ftp://ftp.lysator.liu.se/pub/sgml>; hm--html-menus can be used
113;; with this.
114
109;; This package generalises function html-previewer-process in Marc 115;; This package generalises function html-previewer-process in Marc
110;; Andreessen <marca@ncsa.uiuc.edu>'s html-mode (LCD 116;; Andreessen <marca@ncsa.uiuc.edu>'s html-mode (LCD
111;; modes/html-mode.el.Z) and provides better versions of the URL 117;; modes/html-mode.el.Z) and provides better versions of the URL
@@ -169,6 +175,9 @@
169;; Browse URLs in Usenet messages by clicking mouse-2: 175;; Browse URLs in Usenet messages by clicking mouse-2:
170;; (eval-after-load "gnus" 176;; (eval-after-load "gnus"
171;; '(define-key gnus-article-mode-map [mouse-2] 'browse-url-at-mouse)) 177;; '(define-key gnus-article-mode-map [mouse-2] 'browse-url-at-mouse))
178;; [The current version of Gnus provides a standard feature to
179;; activate URLs in article buffers for invocation of browse-url with
180;; mouse-2.]
172 181
173;; Use the Emacs w3 browser when not running under X11: 182;; Use the Emacs w3 browser when not running under X11:
174;; (or (eq window-system 'x) 183;; (or (eq window-system 'x)
@@ -852,17 +861,23 @@ Default to the URL around or before point."
852;; --- mailto --- 861;; --- mailto ---
853 862
854;;;###autoload 863;;;###autoload
855(defun browse-url-mail (url) 864(defun browse-url-mail (url &optional new-window)
856 "Open a new mail message buffer within Emacs. 865 "Open a new mail message buffer within Emacs.
857Default to the mailto URL around or before point." 866Default to using the mailto: URL around or before point as the
867recipient's address. Supplying a non-nil interactive prefix argument
868will cause the mail to be composed in another window rather than the
869current one."
858 (interactive (browse-url-interactive-arg "Mailto URL: ")) 870 (interactive (browse-url-interactive-arg "Mailto URL: "))
859 (save-excursion 871 (save-excursion
860 ;; open mail buffer, specifying TO and REPLYBUFFER 872 (let ((func (if new-window
861 (mail nil (if (string-match "^mailto:" url) 873 'compose-mail-other-window
874 'compose-mail))
875 (to (if (string-match "^mailto:" url)
862 (substring url 7) 876 (substring url 7)
863 url) 877 url)))
864 nil nil nil 878 (apply func
865 (current-buffer)))) 879 (list to nil nil nil nil nil (cons 'insert-buffer
880 (current-buffer)))))))
866 881
867;; --- Random browser --- 882;; --- Random browser ---
868 883