From: Pip Cet <pipcet@gmail.com>
To: 33414@debbugs.gnu.org
Subject: bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at
Date: Sat, 17 Nov 2018 13:30:04 +0000 [thread overview]
Message-ID: <CAOqdjBemRE0Vpe_KDG3iZ+dMgoB-BZYnkxjA5Yoe-HW7vttpdg@mail.gmail.com> (raw)
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.
next reply other threads:[~2018-11-17 13:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-17 13:30 Pip Cet [this message]
2018-11-17 13:46 ` bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOqdjBemRE0Vpe_KDG3iZ+dMgoB-BZYnkxjA5Yoe-HW7vttpdg@mail.gmail.com \
--to=pipcet@gmail.com \
--cc=33414@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.