From: Barry OReilly <gundaetiapo@gmail.com>
To: 14281@debbugs.gnu.org
Subject: bug#14281: 24.3; replace-match leaves point at wrong place
Date: Thu, 9 May 2013 15:07:51 -0400 [thread overview]
Message-ID: <CAFM41H0Z_R-2M7v-_PDqubOiwc5k-79HOtkgq5FN6d1phU488Q@mail.gmail.com> (raw)
In-Reply-To: <CAFM41H2akfHWB1LXsxckVTEDy6O-8KGCCTCwNdPFJuUe4NVgYQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]
I reproduced the issue again and investigated. Since I'm unsure how to
determine information about the Lisp system within GDB, I used debug
statements in C and Lisp to arrive at the following description of what
happens, additive to my previous description:
My after-change-functions, in order, are:
semantic-change-function
c-after-change
jit-lock-after-change
search_regs.start[0] first takes on the incorrect value inside
c-after-change's call to save-match-data. Since c-after-change code seems
correct, I determined that the match-data function begins returning the
incorrect value during semantic-change-function. I am using CEDET r8557.
>> I suppose that caveat would pin the bug on one of the third party
>> packages I use. However, why couldn't Emacs save off the match-data
>> itself and restore it after the after-change-functions? Is there any
>> legit situation where a change hook would want to change the
>> match-data in effect after the change hook returns?
Stefan> There are many cases where an after-change-function won't use
regular
Stefan> expressions at all.
The answer doesn't seem to fit the question, so I'll rephrase: Why does
Emacs allow after-change-functions to change the match-data beyond its
scope? Or: why doesn't the signal_after_change C function do like
set-match-data instead of leaving it to client change hooks to do so?
[-- Attachment #2: Type: text/html, Size: 1511 bytes --]
next prev parent reply other threads:[~2013-05-09 19:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-27 1:19 bug#14281: 24.3; replace-match leaves point at wrong place Barry OReilly
2013-05-09 19:07 ` Barry OReilly [this message]
2013-05-09 21:27 ` Stefan Monnier
2013-05-10 13:27 ` Barry OReilly
2013-05-10 18:19 ` Barry OReilly
2013-05-10 20:56 ` Stefan Monnier
2013-05-14 17:01 ` Barry OReilly
2013-05-15 15:03 ` Barry OReilly
2013-05-15 19:18 ` Stefan Monnier
2013-05-15 20:44 ` Barry OReilly
2013-05-15 20:58 ` Barry OReilly
2013-05-21 21:49 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFM41H0Z_R-2M7v-_PDqubOiwc5k-79HOtkgq5FN6d1phU488Q@mail.gmail.com \
--to=gundaetiapo@gmail.com \
--cc=14281@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 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).