changeset 58343:d9b4c5625386

(url-mm-callback): Delay the invocation of `mm-destroy-parts'. Invoke `mm-destroy-parts' when the buffer is killed.
author Masatake YAMATO <jet@gyve.org>
date Sat, 20 Nov 2004 03:57:59 +0000
parents def2dd949fa4
children 975ba3cd4a50
files lisp/url/ChangeLog lisp/url/url.el
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/url/ChangeLog	Sat Nov 20 03:09:38 2004 +0000
+++ b/lisp/url/ChangeLog	Sat Nov 20 03:57:59 2004 +0000
@@ -1,3 +1,9 @@
+2004-11-20  Masatake YAMATO  <jet@gyve.org>
+
+	* url.el (url-mm-callback): Delay the invocation
+	of `mm-destroy-parts'. Invoke `mm-destroy-parts'
+	when the buffer is killed.
+
 2004-11-12  Masatake YAMATO  <jet@gyve.org>
 
 	* url-mailto.el (url-mailto): Fix a typo in the 
--- a/lisp/url/url.el	Sat Nov 20 03:09:38 2004 +0000
+++ b/lisp/url/url.el	Sat Nov 20 03:57:59 2004 +0000
@@ -207,7 +207,10 @@
 	    (message "Viewing externally")
 	    (kill-buffer (current-buffer)))
 	(display-buffer (current-buffer))
-	(mm-destroy-parts handle)))))
+	(add-hook 'kill-buffer-hook 
+		  `(lambda () (mm-destroy-parts ',handle))
+		  nil
+		  t)))))
 
 (defun url-mm-url (url)
   "Retrieve URL and pass to the appropriate viewing application."