summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorwl <wl>2006-04-04 20:20:03 +0000
committerwl <wl>2006-04-04 20:20:03 +0000
commitdbc2938995b9724fb06930dcd7f4b4af833793bf (patch)
treee0b0a8988ac64baf2a07d2e8451293596e3e604c /doc
parent8de88e49f386e53ed293ee62a48d66fd8c67ccbe (diff)
downloadgroff-dbc2938995b9724fb06930dcd7f4b4af833793bf.tar.gz
Implement new number register `.br' which is set to 1 if a macro has
been called as .foo and to 0 if called as 'bar. This is useful for -mtrace so that requests can be reliably traced too. * src/roff/troff/input.cpp (input_iterator): Add virtual function `get_break_flag'. (macro_iterator): Add `with_break' member and `get_break_flag' function. Update constructors. (input_stack): Add function `get_break_flag'. (break_flag_reg): New number register class. (input_init_requests): Register `.br'. * src/roff/troff/TODO: Updated. * tmac/trace.tmac: s/!!sp/!!!sp/. Modify definitions of `de', `de1', `am', and `am1' to use \n[.br]. * docs/groff.texinfo, man/groff.man, man/groff_diff.man, NEWS: Document it.
Diffstat (limited to 'doc')
-rw-r--r--doc/groff.texinfo25
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/groff.texinfo b/doc/groff.texinfo
index 907c9a59..d1f7ee79 100644
--- a/doc/groff.texinfo
+++ b/doc/groff.texinfo
@@ -5438,6 +5438,29 @@ In most cases the period is used as a control character. Several
requests cause a break implicitly; using the single quote control
character prevents this.
+@Defreg {.br}
+A read-only number register which is set to@tie{}1 if a macro is called
+with the normal control character (as defined with the @code{cc}
+request), and set to@tie{}0 otherwise.
+
+@cindex modifying requests
+@cindex requests, modifying
+This allows to reliably modify requests.
+
+@Example
+.als bp*orig bp
+.de bp
+. tm before bp
+. ie \\n[.br] .bp*orig
+. el 'bp*orig
+. tm after bp
+..
+@endExample
+
+Using this register outside of a macro makes no sense (it always returns
+zero in such cases).
+@endDefreg
+
@menu
* Request and Macro Arguments::
@end menu
@@ -7620,6 +7643,8 @@ no-break control character is associated with the current environment
(@pxref{Environments}).
@endDefreq
+@xref{Requests}.
+
@Defreq {eo, }
@cindex disabling @code{\} (@code{eo})
@cindex @code{\}, disabling (@code{eo})