From: Chong Yidong Date: Thu, 15 Sep 2005 03:30:39 +0000 (+0000) Subject: 2005-09-15 Chong Yidong X-Git-Tag: emacs-pretest-22.0.90~7102 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b0742512e574c25091cb75f62064af3cf4b3a8b5;p=emacs.git 2005-09-15 Chong Yidong * url-mailto.el (url-mailto): Delete mail buffer after sending autogenerated mail. --- diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 4235fe13e34..5a9f2093942 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2005-09-15 Chong Yidong + + * url-mailto.el (url-mailto): Delete mail buffer after sending + autogenerated mail. + 2005-09-13 Chong Yidong * url-mailto.el (url-mailto): Always use a new mail buffer. diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el index d5f96184013..03770c6d977 100644 --- a/lisp/url/url-mailto.el +++ b/lisp/url/url-mailto.el @@ -124,12 +124,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)