[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unbalanced change hooks (part 2)
From: |
Stefan Monnier |
Subject: |
Re: Unbalanced change hooks (part 2) |
Date: |
Sun, 31 Jul 2016 14:55:32 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> These hook variables let you arrange to take notice of ALL changes
> in ALL buffers. [My emphasis]
>
> Your interpretation of that seems to be that each buffer change will
> call _at least_ one of before-... and after-..., but not necessarily
> both. That doesn't seem sensible to me.
I fully agree that if you only use before-change-functions (or only use
after-change-functions), your hook function should see *all* changes.
This is an important property and if there are places where this is not
the case, we should fix them.
> No. A program (such as CC Mode) reacts to a _change_, not merely to
> what a buffer looks like after a change.
But here we have a problem: I don't think that
before/after-change-functions should be always be properly paired, which
IIUC is a property that CC-mode relies on.
Stefan