Gnus development mailing list
 help / color / mirror / Atom feed
* *Group* buffer disaster fix
@ 1998-10-21 14:30 Hrvoje Niksic
  1998-10-21 16:25 ` Lloyd Zusman
  1998-10-22  1:56 ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 9+ messages in thread
From: Hrvoje Niksic @ 1998-10-21 14:30 UTC (permalink / raw)


This patch should work.  Lloyd, Lars, please comment.


1998-10-21  Hrvoje Niksic  <hniksic@srce.hr>

	* mailcap.el (mailcap-save-binary-file): Use unwind-protect.

	* mm-decode.el (mm-display-external): Set undisplayer to mm
	buffer, not the current buffer; use unwind-protect.

--- mm-decode.el.orig	Wed Oct 21 14:32:26 1998
+++ mm-decode.el	Wed Oct 21 14:35:45 1998
@@ -220,8 +220,10 @@
 	  (buffer-disable-undo)
 	  (mm-set-buffer-file-coding-system 'no-conversion)
 	  (insert-buffer-substring cur)
-	  (funcall method)
-	  (mm-handle-set-undisplayer handle (current-buffer)))
+	  (let ((mm (current-buffer)))
+	    (unwind-protect
+		(funcall method)
+	      (mm-handle-set-undisplayer handle mm))))
       (let* ((dir (make-temp-name (expand-file-name "emm." mm-tmp-directory)))
 	     (filename (mail-content-type-get
 			(mm-handle-disposition handle) 'filename))
--- mailcap.el.orig	Wed Oct 21 16:27:16 1998
+++ mailcap.el	Wed Oct 21 16:27:30 1998
@@ -272,11 +272,12 @@
 
 (defun mailcap-save-binary-file ()
   (goto-char (point-min))
-  (let ((file (read-file-name
-	       "Filename to save as: "
-	       (or mailcap-download-directory "~/")))
-	(require-final-newline nil))
-    (write-region (point-min) (point-max) file)
+  (unwind-protect
+      (let ((file (read-file-name
+		   "Filename to save as: "
+		   (or mailcap-download-directory "~/")))
+	    (require-final-newline nil))
+	(write-region (point-min) (point-max) file))
     (kill-buffer (current-buffer))))
 
 (defun mailcap-maybe-eval ()


-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Be nice to your kids.
They'll choose your nursing home.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1998-10-24  4:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-21 14:30 *Group* buffer disaster fix Hrvoje Niksic
1998-10-21 16:25 ` Lloyd Zusman
1998-10-21 16:40   ` Hrvoje Niksic
1998-10-21 17:06     ` Lloyd Zusman
1998-10-21 17:49       ` Hrvoje Niksic
1998-10-22  1:59       ` Lars Magne Ingebrigtsen
1998-10-22  3:14         ` Lloyd Zusman
1998-10-24  4:32           ` Lars Magne Ingebrigtsen
1998-10-22  1:56 ` Lars Magne Ingebrigtsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).