GNU bug report logs -
#16796
24.3.50; global value of after-change-functions reset without error
Previous Next
Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>
Date: Tue, 18 Feb 2014 17:45:02 UTC
Severity: normal
Found in version 24.3.50
Fixed in version 25.1
Done: Alex <agrambot <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 16796 <at> debbugs.gnu.org (full text, mbox):
Michael Heerdegen <michael_heerdegen <at> web.de> writes:
> Hello,
>
> I'm working on a package that needs to install a function in (the global
> binding of) `after-change-functions'.
>
> I experience that the global value of `after-change-functions' is
> randomly reset to nil, without any error involved or any error message
> being printed. I invested lots of time to preclude any error.
>
> I installed a timer that frequently checks whether
> `after-change-functions' had been reset. A good situation to provoke
> the reset was completing with helm and just typing in the minibuffer.
> At random locations, the reset happened. Note that there is no error
> involved, nor does helm touch `after-change-functions'.
>
>
> Here is a different example that "works" from emacs -Q:
>
> (progn
>
> (defun foo (&rest _) ())
>
> (add-hook 'after-change-functions 'foo)
>
> (defun complain ()
> (when (not (memq 'foo (default-value 'after-change-functions)))
> (message "Why does this happen?")
> (cancel-timer complain-timer)))
>
> (defvar complain-timer
> (run-with-idle-timer .03 .03 #'complain))
>
> (require 'cl-lib)
> (global-set-key
> [f9]
> (lambda () (interactive)
> (completing-read
> "Hit tab and C-g: "
> (cl-loop for i from 1 to 100000
> collect (format "%d" i))))))
>
> Hit f9 and C-g one or two times. I get "Why does this happen?", but not
> always. If I repeat the test several times, I'll always happen sooner
> or later.
I can reproduce this on 24.5 but not in 25.1. Can you reproduce this on 25.1
or up?
This bug report was last modified 8 years and 314 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.