GNU bug report logs - #20411
24.3; Docstring of `next-single-property-change'

Previous Next

Package: emacs;

Reported by: Eli Barzilay <eli <at> barzilay.org>

Date: Thu, 23 Apr 2015 14:09:01 UTC

Severity: minor

Found in version 24.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 20411 <at> debbugs.gnu.org (full text, mbox):

From: Eli Barzilay <eli <at> barzilay.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 20411 <at> debbugs.gnu.org
Subject: Re: bug#20411: 24.3; Docstring of `next-single-property-change'
Date: Thu, 23 Apr 2015 16:29:55 -0400
Bah.  Yes, I completely missed that.  Looking at it again, I think that
it's that "never equal" that threw me off and write code that assumes
that.  To make it worse, it reads like an interface very similar to
`re-search-forward' up to that paragraph, and that "helped" me miss the
last sentence.

So I still think that it's confusing -- maybe "except when LIMIT is
non-nil" and possibly a warning that this is different from the
searching functions?

On Thu, Apr 23, 2015 at 11:31 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Eli Barzilay <eli <at> barzilay.org>
>> Date: Thu, 23 Apr 2015 10:08:01 -0400
>>
>> The documentation for `next-single-property-change' has:
>>
>>   Return nil if the property is constant all the way to the end of
>>   object.  If the value is non-nil, it is a position greater than
>>   position, never equal.
>>
>> Both of these are wrong when a bound is given.
>
> Which is why the doc string says, right after the text you cited:
>
>   If the optional fourth argument LIMIT is non-nil, don't search
>   past position LIMIT; return LIMIT if nothing is found before LIMIT.
>
> Isn't this exactly what you were looking for?



-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!




This bug report was last modified 10 years and 86 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.