Docs for window-configuration-hook

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

These are excerpts form windows.texi, documenting the
window-coniguration-hook, presented here so others can comment.

I realize that this is perhaps not how things are traditionally
documented, but this seems a lot more helpful than just to include it
in the list in hooks.texi.


In the node `Window Configurations':
---------------------------------------------------------------
  Use the window configuration hook whenever you need to dynamicly
adapt to window configuration changes.  @xref{Window Configuration
Hook}.
---------------------------------------------------------------

And then, the actual node:
---------------------------------------------------------------
@node Window Configuration Hook
@section Window Configuration Hook
@cindex window configuration hook

  The @var{window-configuration-hook}, is a list of functions run
whenever the window configuration of a frame changes.

  There is no garantee that this will only be run at the end of some
function that changes the window configuration (read layout), in fact
it can be run several times while the window layout changes.

  The core functions that run this hook try to ensure that it does not
cause infinite loops, but if you run some functions that change the
layout @strong{expect trouble}.

  Here is a complete list of core functions, running the hook.  All
other window manipulating functions call these and therefore run the
hook at some point in time.  If not, that's a bug, and you should
report it as such.

@table @code
@item delete-window
@item delete-other-windows
@item set-window-buffer
@item split-window
@item enlarge-window
@item enlarge-window-pixels
@item shrink-window
@item shrink-window-pixels
@end table
---------------------------------------------------------------

The above docs can change, and probably will -- I have not yet
implemented this in a way so the hook functions get the window as an
argument, but that probably changes, and the docs will reflect that.


Have fun,

Johann

-- 
Windows? I look out of windows.