Re: Functions running window-configuration-hook (M-x reimplement-wheel)

Johann "Myrkraverk" Oskarsson <[email protected]> Tue, 15 Jun 2004 19:32:53 +0000
Newsgroups gmane.emacs.xemacs.design
Message-ID <[email protected]>
Hi,

Stephen J. Turnbull writes:
 > >>>>> "Johann" == Johann Oskarsson <[email protected]> writes:

 >     Johann> I'm not sure whether I should include the run hooks, or
 >     Johann> put it in change_window_height, which is not visible on
 >     Johann> the lisp level, and all of the above functions call.

 > Isn't there a parallel change_window_width for vertically split
 > windows?

No, change_window_width takes an argument, horizontalp; it is just one
function.  This is just a matter of style and maintainability.  Do the
run hooks 4 times, or just only one time (in code)?

change_window_width is *only* called in these four functions at the
time of this writing (beta 17).

 >     Johann> I'm also open to sugestions whether
 >     Johann> window-configuration-hook functions should get the changed
 >     Johann> frame as an argument?

 > Shouldn't they get the window?  If you have the window you can get its
 > frame.

K, I'll think about it -- haven't looked at arguments in hooks yet.  I
don't need it, but I guess it should be there.

[ ... infinite loops ...]

 > No, I really think you should take care of that.  You should find (if
 > necessary, add) an "in_configuration_change" flag to the frame (or
 > maybe the window), and disallow recursive calls on that frame
 > (resp. window).

I've added a shread of an attempt at this, though it's not per frame
yet, but I'll keep trying.  For safety reasons, I won't trust a lisp
visible flag.

Also, I think I should point out; I thought of implemeting this using
the frame-window-structure-changed flag (whatever that is), but
decided against it -- for now.  I think I should explore that
implementation technique though.

 >     Johann> Windows? I look out of windows.

 > Is that because you can't look _in_?  :-)

Hmmm, well, I don't do that too much -- I'm not a voyeur :-D


Have fun,

Johann

-- 
Windows? I look out of windows.