From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id q6IGKi07007857 for ; Wed, 18 Jul 2012 12:20:44 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id q6IGKhNs004201; Wed, 18 Jul 2012 12:20:43 -0400 (EDT) Date: Wed, 18 Jul 2012 12:20:43 -0400 (EDT) Message-Id: <201207181620.q6IGKhNs004201@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Let a trailing .Ns macro take effect even on an input line X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Let a trailing .Ns macro take effect even on an input line containing a partial implicit macro. Fixes horizontal spacing in vi(1), ddb(4), and ppp(8). OpenBSD rev. 1.74. Modified Files: -------------- mdocml: TODO mdoc_macro.c Revision Data ------------- Index: TODO =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/TODO,v retrieving revision 1.139 retrieving revision 1.140 diff -LTODO -LTODO -u -p -r1.139 -r1.140 --- TODO +++ TODO @@ -243,15 +243,6 @@ Also, we don't want to break the line within the argument of: .Fa "chtype tl" -- .Ns should work when called at the end of an input line, see - the following code in vi(1): - .It Xo - .Op Ar line - .Cm a Ns Op Cm ppend Ns - .Op Cm !\& - .Xc - The input text is appended after the specified line. - - Header lines of excessive length: Port OpenBSD man_term.c rev. 1.25 to mdoc_term.c and document it in mdoc(7) and man(7) COMPATIBILITY Index: mdoc_macro.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_macro.c,v retrieving revision 1.116 retrieving revision 1.117 diff -Lmdoc_macro.c -Lmdoc_macro.c -u -p -r1.116 -r1.117 --- mdoc_macro.c +++ mdoc_macro.c @@ -1,7 +1,7 @@ /* $Id$ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons - * Copyright (c) 2010 Ingo Schwarze + * Copyright (c) 2010, 2012 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -1358,6 +1358,13 @@ blk_part_imp(MACRO_PROT_ARGS) if (n && ! rew_sub(MDOC_BLOCK, m, tok, line, ppos)) return(0); + + /* Move trailing .Ns out of scope. */ + + for (n = body->child; n && n->next; n = n->next) + /* Do nothing. */ ; + if (n && MDOC_Ns == n->tok) + mdoc_node_relink(m, n); return(1); } -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv