unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: 39889@debbugs.gnu.org
Subject: bug#39889: emacs-27 and master: unbalanced invocation of after-change-functions in cedet
Date: Tue, 3 Mar 2020 20:15:30 +0000	[thread overview]
Message-ID: <20200303201530.GA14361@ACM> (raw)

Hello, Emacs.

In both the emacs-27 and master branches, in
.../lisp/cedet/srecode/insert.el, function srecode-insert-fcn,
after-change-functions is invoked without a matching invocation of
before-change-functions.  This violates the specified use of these hooks
described on the page "Change Hooks" in the Elisp manual.

CC Mode can recover from this scenario, though its recovery is slow (it
essentially runs the change hooks over the entire buffer).

It is not clear whether or not the syntax-ppss mechanism will recover
gracefully from this bug.

Any other uses of before-change-functions will probably suffer
corruption from this bug.

It looks like a good solution might well be to surround the pertinent
code with the combine-change-calls macro, at least for Emacs-27 onwards.
For the use of the cedet package in older emacsen, an explicit
invocation of before-change-functions needs adding.

-- 
Alan Mackenzie (Nuremberg, Germany).





                 reply	other threads:[~2020-03-03 20:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200303201530.GA14361@ACM \
    --to=acm@muc.de \
    --cc=39889@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).