unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at
@ 2018-11-17 13:30 Pip Cet
  2018-11-17 13:46 ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Pip Cet @ 2018-11-17 13:30 UTC (permalink / raw)
  To: 33414

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.





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-10-07 19:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-17 13:30 bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at Pip Cet
2018-11-17 13:46 ` Eli Zaretskii
2018-11-17 14:14   ` Pip Cet
2018-11-17 14:36     ` Eli Zaretskii
2021-08-12 13:11       ` Lars Ingebrigtsen
2021-09-04 18:39         ` Philipp
2021-09-04 19:33           ` bug#33414: [External] : " Drew Adams
2021-09-05  9:29           ` Lars Ingebrigtsen
2021-09-05  9:40             ` Eli Zaretskii
2021-09-05  9:45               ` Lars Ingebrigtsen
2021-09-05  9:55                 ` Eli Zaretskii
2021-10-07 18:49                   ` Lars Ingebrigtsen
2021-10-07 19:07                     ` bug#33414: [External] : " Drew Adams
2021-10-07 19:11                       ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).