bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #62339] [doc]: Add a remark about a pitfall using \s0


From: Dave
Subject: [bug #62339] [doc]: Add a remark about a pitfall using \s0
Date: Thu, 21 Apr 2022 16:01:15 -0400 (EDT)

Follow-up Comment #2, bug #62339 (project groff):

There's nothing special about \s in this regard.  Many requests and escapes
take a special argument (or use lack of one) to indicate "go back to the
previous value."  In isolated cases (one, and maybe the only, example being
the .ev request), roff maintains an internal stack, so the "go back" syntax
actually can be nested.  But this is the exception rather than the rule. 
Typically "go back to the previous value" does exactly that, and while there
are plenty of aspects of roff syntax lying in wait to trip up the unwary, I
think the documentation makes this behavior pretty clear; a rudimentary
understanding of "previous value" will clue in the reader that what coders
think of as nesting won't work.

Certainly there is more risk of getting tripped up by this when a macro calls
another macro, or a string another string, without understanding all state
changes that macro or string might make, and this could be a point to make (if
it's not there already) when discussing a high-level view of the language.  Do
you have a proposed wording for this?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62339>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]