GNU bug report logs -
#37488
27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward'
Previous Next
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
> But that's not what the code seems to do. It just compares the value
> of property in the found region with that at point. In this example,
> they both are "o", so the code will reject the "oo" region at the end,
> and try to find the next one (and fail, because there's none).
No. Once again, you can test this behaviour with this simple code:
(insert "This is "
(propertize "bold1" 'face 'bold)
" and this is "
(propertize "italic1" 'face 'italic)
(propertize "bold2" 'face 'bold)
(propertize "italic2" 'face 'italic)
" at the end")
Put point inside the first bold text and see the difference between
(text-property-search-forward 'face 'bold t t)
(text-property-search-forward 'face 'bold t nil)
>> >> > I don't understand how this answers my questions.
>> >>
>> >> Try (text-property-search-forward 'face) on the example. It'll give you
>> >> all regions that has a face property.
>> >
>> > That's a weird way to get to the result, if someone wants it.
>>
>> Seems like the obvious way to me.
>
> The obvious one would be to call next-single-property-change.
That doesn't give you the region matched.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 5 years and 294 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.