GNU bug report logs - #39889
emacs-27 and master: unbalanced invocation of after-change-functions in cedet

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Tue, 3 Mar 2020 20:16:02 UTC

Severity: normal

To reply to this bug, email your comments to 39889 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#39889; Package emacs. (Tue, 03 Mar 2020 20:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alan Mackenzie <acm <at> muc.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 03 Mar 2020 20:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: bug-gnu-emacs <at> gnu.org
Subject: emacs-27 and master: unbalanced invocation of after-change-functions
 in cedet
Date: Tue, 3 Mar 2020 20:15:30 +0000
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).




This bug report was last modified 4 years and 52 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.