Subject: Re: bug#1301: previous-single-char-property-change on string with no match returns string end

From: martin rudalics <[email-masked]>
Date: Mon, 03 Nov 2008 18:35:17 +0100

> When searching a string using previous-single-char-property-change, and no
 > change is found, it returns the maximum valid position in object, instead
 > of the minimum valid position in object as stated in the emacs lisp manual.
 >
 > This can be reproduced by the following lisp statement, which returns 10
 > instead of 0.
 >
 > (previous-single-char-property-change 10 'display "0123456789")
 >
 >
 > In GNU Emacs 22.2.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 >  of 2008-06-12 on aquarius

Thank you very much for the report.

Fixed for Emacs 23.0.60 as

2008-11-03  Martin Rudalics  <[email-masked]>

	* textprop.c (Fprevious_single_char_property_change): Return 0
	when there's no change in a string.  (Bug#1301)

martin