[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: modification hooks called only once in c-mode]
From: |
Stefan Monnier |
Subject: |
Re: address@hidden: modification hooks called only once in c-mode] |
Date: |
Mon, 13 Aug 2007 10:01:58 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
>> A side benefit of the change is that now (after|before)-change-function keep
>> their values while they run, so we can change (after|before)-change-functions
>> from an (after|before)-change-function (syntax.el enjoys doing that).
>>
>> A side benefit of the change is that now (after|before)-change-function keep
>> their values while they run, so we can change (after|before)-change-functions
>>> from an (after|before)-change-function (syntax.el enjoys doing that).
> In the particular case `c-after-change' uses `c-save-buffer-state' which
> binds (after|before)-change-functions to nil (probably for XEmacs
> compatibility). Wouldn't syntax.el be affected by that?
syntax.el sometimes does an add-hook/remove-hook on before-change-functions
from code which may be run from modification hooks. The remove-hook is only
an optimization so if it's ignored/thrown out it doesn't impact correctness.
If the add-hook is ignored (it's run from syntax-ppss), it may OTOH impact
correctness, in which case the code that calls syntax-ppss under these
conditions may have to do the add-hook manually or somehow call
syntax-ppss-flush-cache manually when needed.
Stefan