Mercurial > emacs
diff lisp/url/url-mailto.el @ 83381:d84f940244dc
Merged from miles@gnu.org--gnu-2005 (patch 116-117, 544-550)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-544
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-545
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-546
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-547
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-548
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-549
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-550
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-116
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-117
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-421
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sat, 17 Sep 2005 19:10:55 +0000 |
parents | 532e0a9335a9 75da5ea5fb14 |
children | 2a679c81f552 |
line wrap: on
line diff
--- a/lisp/url/url-mailto.el Sat Sep 17 19:00:49 2005 +0000 +++ b/lisp/url/url-mailto.el Sat Sep 17 19:10:55 2005 +0000 @@ -92,7 +92,11 @@ (setq args (cons (list "to" to) args)))) (setq subject (cdr-safe (assoc "subject" args))) - (if (fboundp url-mail-command) (funcall url-mail-command) (mail)) + (if (fboundp url-mail-command) + (if (eq url-mail-command 'compose-mail) + (compose-mail nil nil nil 'new) + (funcall url-mail-command)) + (mail 'new)) (while args (if (string= (caar args) "body") (progn @@ -124,12 +128,14 @@ ;; It seems Microsoft-ish to send without warning. ;; Fixme: presumably this should depend on a privacy setting. (if (y-or-n-p "Send this auto-generated mail? ") - (cond ((eq url-mail-command 'compose-mail) - (funcall (get mail-user-agent 'sendfunc) nil)) - ;; otherwise, we can't be sure - ((fboundp 'message-send-and-exit) - (message-send-and-exit)) - (t (mail-send-and-exit nil))))) + (let ((buffer (current-buffer))) + (cond ((eq url-mail-command 'compose-mail) + (funcall (get mail-user-agent 'sendfunc) nil)) + ;; otherwise, we can't be sure + ((fboundp 'message-send-and-exit) + (message-send-and-exit)) + (t (mail-send-and-exit nil))) + (kill-buffer buffer)))) nil)) (provide 'url-mailto)