From xemacs-m  Thu Jul 10 01:05:04 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id BAA26366
	for <xemacs-beta@xemacs.org>; Thu, 10 Jul 1997 01:05:03 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.6/8.8.6) id XAA11556;
	Wed, 9 Jul 1997 23:08:01 -0700
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: [PATCH] Re: gif problem
References: <87en97c3sb.fsf@mharnois.workgroup.net>
X-Url: http://www.miranova.com/%7Esteve/
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@xemacs.org>
In-Reply-To: Michael Harnois's message of "09 Jul 1997 16:29:56 -0500"
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: text/plain; charset=US-ASCII
Date: 09 Jul 1997 23:07:59 -0700
Message-ID: <m2soxnsam8.fsf@altair.xemacs.org>
Lines: 69
X-Mailer: Gnus v5.4.62/XEmacs 20.3(beta13) - "Brussels"

There are multiple problems here.

1.  There's the problem Michael describes which is reproducible.

2.  Michael's messagee doesn't decode properly (as do any inline
    attachments encoded with x-uue).  The buffer mysteriously gets
    turned read-only due to some magical hook invoked from
    insert-file-contents.

3.  Fixing problem #2 leads to getting spurious `Invalid glyph!'
    messages when nothing appears to be wrong.

Here's my patch for 2 & 3.

1997-07-09  Steven L Baur  <steve@altair.xemacs.org>

	* mel/mel-u.el (uuencode-external-decode-region): Force
	buffer-read-only nil because it gets changed magically to t during 
	the call to `insert-file-contents'.

	* tm/tm-image.el (mime-preview/filter-for-image): Comment out test 
	for invalid glyph.  It appears to be non-functional.

Index: lisp/mel/mel-u.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/mel/mel-u.el,v
retrieving revision 1.3
diff -u -r1.3 mel-u.el
--- mel-u.el	1997/03/16 03:05:15	1.3
+++ mel-u.el	1997/07/10 05:51:44
@@ -84,6 +84,10 @@
 		  t nil nil (cdr uuencode-external-decoder))
 	   (setq filename (expand-file-name filename mime-temp-directory))
 	   (as-binary-input-file (insert-file-contents filename))
+	   ;; The previous line causes the buffer to be made read-only, I
+	   ;; do not pretend to understand the control flow leading to this
+	   ;; but suspect it has something to do with image-mode. -slb
+	   (setq buffer-read-only nil)
 	   (delete-file filename)
 	   ))
       )))


Index: lisp/tm/tm-image.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/tm/tm-image.el,v
retrieving revision 1.7
diff -u -r1.7 tm-image.el
--- tm-image.el	1997/06/06 00:57:43	1.7
+++ tm-image.el	1997/07/10 05:59:24
@@ -155,10 +155,10 @@
 	   (gl (image-normalize minor (buffer-string)))
 	   e)
       (delete-region (point-min)(point-max))
-      (cond ((image-invalid-glyph-p gl)
-	     (setq gl nil)
-	     (message "Invalid glyph!")
-	     )
+      (cond ;; ((image-invalid-glyph-p gl)
+	     ;; (setq gl nil)
+	     ;; (message "Invalid glyph!")
+	     ;; )
 	    ((eq (aref gl 0) 'xbm)
 	     (let ((xbm-file
 		    (make-temp-name (expand-file-name "tm" mime/tmp-dir))))

-- 
steve@calag.com baur
Unsolicited commercial e-mail will be billed at $250/message.

