From xemacs-m  Sat May 31 11:01:02 1997
Received: from mailbox2.ucsd.edu (mailbox2.ucsd.edu [132.239.1.54])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id LAA14843
	for <xemacs-beta@xemacs.org>; Sat, 31 May 1997 11:01:02 -0500 (CDT)
Received: from sdnp5.ucsd.edu (sdnp5.ucsd.edu [132.239.79.10]) by mailbox2.ucsd.edu (8.8.5/8.6.9) with SMTP id JAA29213 for <xemacs-beta@xemacs.org>; Sat, 31 May 1997 09:01:03 -0700 (PDT)
Received: by sdnp5.ucsd.edu (SMI-8.6/SMI-SVR4)
	id JAA16453; Sat, 31 May 1997 09:01:37 -0700
To: xemacs-beta@xemacs.org
Subject: Re: Bug in `set-text-properties'
References: <kig7mgflkco.fsf_-_@jagor.srce.hr>
X-Face: "oX;zS#-JU$-,WKSzG.1gGE]x^cIg!hW.dq>.f6pzS^A+(k!T|M:}5{_%>Io<>L&{hO7W4cicOQ|>/lZ1G(m%7iaCf,6Qgk0%%Bz7b2-W3jd0m_UG\Y;?]}4s0O-U)uox>P3JN)9cm]O\@,vy2e{`3pb!"pqmRy3peB90*2L
Mail-Copies-To: never
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: multipart/mixed;
 boundary="Multipart_Sat_May_31_09:01:36_1997-1"
Content-Transfer-Encoding: 7bit
From: David Moore <dmoore@ucsd.edu>
Date: 31 May 1997 09:01:36 -0700
In-Reply-To: Hrvoje Niksic's message of 31 May 1997 17:41:43 +0200
Message-ID: <rv7mgfockf.fsf@sdnp5.ucsd.edu>
Lines: 55
X-Mailer: Gnus v5.4.45/XEmacs 20.1

--Multipart_Sat_May_31_09:01:36_1997-1
Content-Type: text/plain; charset=US-ASCII

Hrvoje Niksic <hniksic@srce.hr> writes:

> (set-text-properties (point-min) (point-max) '(hrvoje hahaha face red))
> 
> (set-text-properties (point-min) (point-max) nil)
> 
> And the face stays red.  Which is to say: only the first text
> property is removed.  This is a very serious bug in a very basic
> functionality (it also hits Gnus in many places), and I'd like to see
> a correct version of this ideologically totally blasphemous, but alas
> very much used function.

Yep, it was busted.  Here's a patch.

Sat May 31 09:00:14 1997  David Moore  <dmoore@ucsd.edu>

	* utils/text-props.el (set-text-properties): Was exiting
	map-extents too early.

> If I get the fix for this, there'll be a very good chance of Customize
> buffers not being writable at beginnings and ends in the future
> (i.e. I've found how to fix it, but run into this bug).

That'd be great.


--Multipart_Sat_May_31_09:01:36_1997-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="tp.diff"
Content-Transfer-Encoding: 7bit

--- text-props.el.orig	Sat May 31 08:58:06 1997
+++ text-props.el	Sat May 31 08:57:43 1997
@@ -310,11 +310,15 @@
 The optional fourth argument, BUFFER-OR-STRING,
 is the string or buffer containing the text."
   (map-extents #'(lambda (extent ignored)
+		   ;; #### dmoore - shouldn't this use
+		   ;; (extent-start-position extent)
+		   ;; (extent-end-position extent)
 		   (remove-text-properties start end
 					   (list (extent-property extent
 								  'text-prop)
 						 nil)
-					   buffer-or-string))
+					   buffer-or-string)
+		   nil)
 	       buffer-or-string start end nil nil 'text-prop)
   (add-text-properties start end props buffer-or-string))
 

--Multipart_Sat_May_31_09:01:36_1997-1--

