[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
save-window-excursion and window-configuration-change-hook interaction
From: |
Jay Belanger |
Subject: |
save-window-excursion and window-configuration-change-hook interaction |
Date: |
Mon, 17 May 2010 14:55:53 -0500 |
I'm wondering if the following behavior is expected.
Suppose I have two windows; say the top window is active
and the bottom window (window WIN, buffer BUF) has
===
a
b
c
===
in it, with point before the "a".
If I run the command aaa:
(defun aaa ()
(interactive)
(with-current-buffer BUF
(save-window-excursion
(select-window WIN)
(search-forward "b"))
(set-window-point WIN (point))))
then the point in the bottom window moves to after the "b", which is
what I would expect. However, if the bottom window (with point again
before the "a") has a non-nil window-configuration-change-hook,
then running aaa does not move the point in the bottom window. I would
expected the point in the bottom window to move as before.
(To add the hook, with the bottom window active I did
M-: (add-hook 'window-configuration-change-hook (lambda () ()) nil t)
)
Thanks,
Jay
- save-window-excursion and window-configuration-change-hook interaction,
Jay Belanger <=