GNU bug report logs -
#33414
27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at
Previous Next
Reported by: Pip Cet <pipcet <at> gmail.com>
Date: Sat, 17 Nov 2018 13:31:02 UTC
Severity: normal
Found in version 27.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I'm debugging an issue in a custom mode that happened because my
syntax-propertize function, which is complex, assumed it could use the
match data and looking-at. However, the function itself was called
from within looking-at-p, via a regexp generated by (regexp-opt "..."
'symbols), so inhibit-changing-match-data was still bound to t,
yielding unexpected results.
This was a bit tricky to debug because (backtrace) doesn't work when
inhibit-changing-match-data is t. (In emacs -Q, enter
(let ((inhibit-changing-match-data t)) (backtrace))
into the *scratch* buffer and evaluate with C-M-x.)
At the very least, we should document these unfortunate limitations,
though I think it would be better to remove them.
This bug report was last modified 3 years and 305 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.