2005-09-15 Chong Yidong <cyd@stupidchicken.com>
authorChong Yidong <cyd@stupidchicken.com>
Thu, 15 Sep 2005 03:30:39 +0000 (03:30 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Thu, 15 Sep 2005 03:30:39 +0000 (03:30 +0000)
* url-mailto.el (url-mailto): Delete mail buffer after sending
autogenerated mail.

lisp/url/ChangeLog
lisp/url/url-mailto.el

index 4235fe1..5a9f209 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-15  Chong Yidong  <cyd@stupidchicken.com>
+
+       * url-mailto.el (url-mailto): Delete mail buffer after sending
+       autogenerated mail.
+
 2005-09-13  Chong Yidong  <cyd@stupidchicken.com>
 
        * url-mailto.el (url-mailto): Always use a new mail buffer.
index d5f9618..03770c6 100644 (file)
       ;; 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)