[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inhibit-modification-hooks set to t globally

From: Stefan Monnier
Subject: Re: inhibit-modification-hooks set to t globally
Date: Thu, 25 Sep 2014 17:06:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> Hopefully, not many Lisp packages/functions let-bind this variable, so
> you won't need to wade through too many false positives.

Inhibit-modification-hooks gets let-bound *all the time* by things like
font-lock, after-change-functions, etc...

I see two ways for that variable to become globally non-nil:
- a braindead package uses `setq' on that variable.
- you bang on C-g enough that you end up hitting the infamous
  race-condition on unwind-protect (and let unbinding): unwind-protect
  forms get run when exiting because of C-g, but if you hit C-g while
  running those unwind forms, they may not run to completion, so you can
  end up with some of those unwind forms being "not run" (or only partly
  run).  I guess we could try to inhibit-quit while running the unwind
  forms to try and circumvent this problem, but such a change could
  introduce new bugs (if an unwind-form takes a long time to run,
  i.e. expect to be run without inhibit-quit).

Of course, there could also be a third way, but I can't imagine what
that would look like.

-- Stefan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]