ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [PATCH] Add begin_of_buffer and end_of_buffer hooks for lua pretty printers
@ 2009-06-11 15:47 Matthijs Kooijman
  2009-06-14 13:05 ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Matthijs Kooijman @ 2009-06-11 15:47 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 579 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-08-25 10:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-11 15:47 [PATCH] Add begin_of_buffer and end_of_buffer hooks for lua pretty printers Matthijs Kooijman
2009-06-14 13:05 ` Hans Hagen
2009-06-15  9:00   ` Matthijs Kooijman
2009-07-22 14:24     ` Matthijs Kooijman
2009-07-22 19:53       ` Hans Hagen
2009-07-27 11:30         ` Matthijs Kooijman
2009-08-13 10:10         ` Matthijs Kooijman
2009-08-25 10:47           ` Matthijs Kooijman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).