[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] proposal: add variable traps to groff.
From: |
Tadziu Hoffmann |
Subject: |
Re: [Groff] proposal: add variable traps to groff. |
Date: |
Thu, 30 Sep 2004 14:29:52 +0200 |
User-agent: |
Mutt/1.4i |
> A variable trap that triggers whenever a variable (register and
> string, maybe even diversion, environment, macro) is accessed, i.e.
> created, deleted, changed, read. The trap macro gets a description
> of the variable (register or string) and of the access (action with
> data). The trap macro can modify the result of the action and can
> have additional side effects.
Essentially, we already have a mechanism to trap a "normal"
write to a register -- simply redefine "nr" (but you have to
do all the administrative work of how to deal with which
register yourself). Now all we need is a way to redefine
escape sequences \n, \R, etc. ... :-)