![](https://secure.gravatar.com/avatar/95b5a1ad800a34624a9394503f8d40fc.jpg?s=120&d=mm&r=g)
11 Jun
2009
11 Jun
'09
9:47 a.m.
Hi all, while working on a custom pretty printer, I was having the need to keep some state variables for the duration of one buffer, and reset them again for the next buffer. With the current hooks a pretty printer has available, this is not possible, since you never know what the first and last lines are. The attached patch adds two new hooks, begin_of_buffer and end_of_buffer, which will be called when typing a buffer or a file (e.g. \typebuffer or \typefile). They are not called for typing a phrase (e.g. \type). Is this patch acceptable for inclusion? Gr. Matthijs