[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40000: 27.0.60; next-single-char-property-change hangs on bad argume
From: |
Federico Tedin |
Subject: |
bug#40000: 27.0.60; next-single-char-property-change hangs on bad argument |
Date: |
Mon, 13 Apr 2020 15:52:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
(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
Description: Text Data
- bug#40000: 27.0.60; next-single-char-property-change hangs on bad argument,
Federico Tedin <=
- bug#40000: 27.0.60; next-single-char-property-change hangs on bad argument, Eli Zaretskii, 2020/04/13
- bug#40000: 27.0.60; next-single-char-property-change hangs on bad argument, Federico Tedin, 2020/04/13
- bug#40000: 27.0.60; next-single-char-property-change hangs on bad argument, Eli Zaretskii, 2020/04/13
- bug#40000: 27.0.60; next-single-char-property-change hangs on bad argument, Federico Tedin, 2020/04/13
- bug#40000: 27.0.60; next-single-char-property-change hangs on bad argument, Eli Zaretskii, 2020/04/13
- bug#40000: 27.0.60; next-single-char-property-change hangs on bad argument, Federico Tedin, 2020/04/14
- bug#40000: 27.0.60; next-single-char-property-change hangs on bad argument, Eli Zaretskii, 2020/04/25