diff options
author | wl <wl> | 2013-01-06 21:59:21 +0000 |
---|---|---|
committer | wl <wl> | 2013-01-06 21:59:21 +0000 |
commit | d76a4f413276ed26cc5950d638e2f1cf2e2bb6ec (patch) | |
tree | c3f703c51d6617102184157f68dcb01c63524a9a | |
parent | 64187a029f928012b61d20b7c1d26ea7519ed653 (diff) | |
download | groff-d76a4f413276ed26cc5950d638e2f1cf2e2bb6ec.tar.gz |
[eqn] Add `delim on'.
* src/preproc/eqn/lex.cpp (start_delim_saved, end_delim_saved): New
global variables.
(do_delim): Handle `delim on' to restore previous start and end
delimiters.
* src/preproc/eqn/eqn.man, NEWS: Document it.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | NEWS | 14 | ||||
-rw-r--r-- | src/preproc/eqn/eqn.man | 22 | ||||
-rw-r--r-- | src/preproc/eqn/lex.cpp | 12 |
4 files changed, 56 insertions, 3 deletions
@@ -1,3 +1,14 @@ +2013-01-06 Werner LEMBERG <wl@gnu.org> + + [eqn] Add `delim on'. + + * src/preproc/eqn/lex.cpp (start_delim_saved, end_delim_saved): New + global variables. + (do_delim): Handle `delim on' to restore previous start and end + delimiters. + + * src/preproc/eqn/eqn.man, NEWS: Document it. + 2013-01-02 Deri James <deri@chuzzlewit.myzen.co.uk> [gropdf] Various minor fixes. @@ -9,6 +9,20 @@ This file describes recent user-visible changes in groff. Bug fixes are not described. There are more details in the man and info pages. +VERSION 1.22.2 +============== + +Eqn +--- + +o A GNU extension + + delim on + + has been added to reactivate delimiters which have been disabled with + `delim off'. + + VERSION 1.22.1 ============== diff --git a/src/preproc/eqn/eqn.man b/src/preproc/eqn/eqn.man index f4c6457f..203d9033 100644 --- a/src/preproc/eqn/eqn.man +++ b/src/preproc/eqn/eqn.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1989-2000, 2001, 2004, 2005, 2007, 2009 +Copyright (C) 1989-2001, 2004, 2005, 2007, 2009, 2013 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of @@ -131,6 +131,9 @@ Recognize and .B .EN even when followed by a character other than space or newline. +Also, the statement +.RB ` "delim on" ' +is not handled specially. .TP .B \-N Don't allow newlines within delimiters. @@ -243,6 +246,23 @@ There are some references to the differences between \*(tx and GNU below; these may safely be ignored if you do not know \*(tx. . +.SS Controlling delimiters +. +If not in compatibility mode, +.B eqn +recognizes +. +.RS +.LP +.B delim on +.RE +. +.LP +to restore the delimiters which have been previously disabled +with a call to +.RB ` "delim off" '. +If delimiters haven't been specified, the call has no effect. +. .SS Automatic spacing .B eqn gives each component of an equation a type, and adjusts the spacing diff --git a/src/preproc/eqn/lex.cpp b/src/preproc/eqn/lex.cpp index b328801d..899ecaeb 100644 --- a/src/preproc/eqn/lex.cpp +++ b/src/preproc/eqn/lex.cpp @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2005, 2007, - 2008, 2009 +/* Copyright (C) 1989-1992, 2000-2003, 2005, 2007-2009, 2013 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -1058,6 +1057,9 @@ void do_ifdef() } } +char start_delim_saved = '\0'; +char end_delim_saved = '\0'; + void do_delim() { int c = get_char(); @@ -1069,8 +1071,14 @@ void do_delim() else { if (c == 'o' && d == 'f' && peek_char() == 'f') { (void)get_char(); + start_delim_saved = start_delim; + end_delim_saved = end_delim; start_delim = end_delim = '\0'; } + else if (c == 'o' && d == 'n' && !compatible_flag) { + start_delim = start_delim_saved; + end_delim = end_delim_saved; + } else { start_delim = c; end_delim = d; |