GNU bug report logs -
#40000
27.0.60; next-single-char-property-change hangs on bad argument
Previous Next
Reported by: Yuan Fu <casouri <at> gmail.com>
Date: Mon, 9 Mar 2020 15:41:02 UTC
Severity: normal
Found in version 27.0.60
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
(congratulations on bug #40000! :-)
I'm attaching a patch which solves the issue. Now, all the
`next-*-property-change' functions return LIMIT when it has been
specified and no properties where found up to the buffer's end.
On the other hand, the `previous-*-property-change' functions are a bit
inconsistent for negative values of LIMIT:
(previous-single-char-property-change 2 'test nil -1) -> `args-out-of-range'
(previous-single-property-change 2 'test nil -1) -> -1
(previous-char-property-change 2 -1) -> 1
(previous-property-change 2 nil -1) -> -1
For positive values of LIMIT I didn't find any problems. Although a
negative value for LIMIT doesn't make any sense, only the documentation
for `previous-char-property-change' mentions that "LIMIT is a no-op if
it is less than (point-min)". So maybe this behavior could be added to
the other 3 functions as well.
[0001-Prevent-hanging-in-next-single-char-property-change.patch (text/x-diff, attachment)]
This bug report was last modified 5 years and 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.