[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: save-window-excursion and window-configuration-change-hook interacti
From: |
martin rudalics |
Subject: |
Re: save-window-excursion and window-configuration-change-hook interaction |
Date: |
Thu, 20 May 2010 11:44:39 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
> I assure you, right now I like it less than you do.
It's next to impossible to get this right. If we don't move `point' to
the window's point we get non-standard semantics for the code run in the
hook. That is, we'd violate a basic invariant that with a window
selected and its buffer current, the window's point and the buffer's
point refer to the same position.
If we do move `point' we have two choices: If we restore `point' to its
previous value (using some sort of `save-excursion'), any `point'
changing operations run in the hook are lost and any calculations based
on `point' run in the hook are moot. If we don't restore `point' to its
previous value we get the current behavior.
martin