From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id c87669ab; for ; Tue, 3 Mar 2015 10:04:54 -0500 (EST) Date: Tue, 3 Mar 2015 10:04:54 -0500 (EST) Message-Id: <13959896329447406101.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: texi2mdoc: Account for @item a=@var{foo} and similar by using a `Ns' X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Account for @item a=@var{foo} and similar by using a `Ns' macro to remove spacing between the macro and prior text. This cleans up, among others, the GNU ld.texinfo manual. Also add the backslash. Modified Files: -------------- texi2mdoc: extern.h main.c Revision Data ------------- Index: main.c =================================================================== RCS file: /home/cvs/mdocml/texi2mdoc/main.c,v retrieving revision 1.58 retrieving revision 1.59 diff -Lmain.c -Lmain.c -u -p -r1.58 -r1.59 --- main.c +++ main.c @@ -94,7 +94,8 @@ static const struct texitok __texitoks[T { dosymbol, "*", 1 }, /* TEXICMD_ASTERISK */ { dosymbol, "@", 1 }, /* TEXICMD_AT */ { doignline, "author", 6 }, /* TEXICMD_AUTHOR */ - { doinline, "b", 1 }, /* TEXICMD_BOLD */ + { doinline, "b", 1 }, /* TEXICMD_B */ + { dosymbol, "\\", 1 }, /* TEXICMD_BACKSLASH */ { dosymbol, "!", 1 }, /* TEXICMD_BANG */ { dosymbol, "bullet", 6 }, /* TEXICMD_BULLET */ { dobye, "bye", 3 }, /* TEXICMD_BYE */ @@ -733,6 +734,15 @@ doinline(struct texi *p, enum texicmd cm return; } + /* + * If we haven't seen any whitespace, then we don't want the + * subsequent macro to insert any whitespace. + */ + if (p->outmacro && 0 == p->seenws) { + teximacroopen(p, "Ns"); + teximacroclose(p); + } + teximacroopen(p, macro); p->seenws = 0; if (TEXICMD_SC == cmd) @@ -1203,6 +1213,9 @@ dosymbol(struct texi *p, enum texicmd cm break; case (TEXICMD_AT): texiputchar(p, '@'); + break; + case (TEXICMD_BACKSLASH): + texiputchar(p, '\\'); break; case (TEXICMD_BANG): texiputchar(p, '!'); Index: extern.h =================================================================== RCS file: /home/cvs/mdocml/texi2mdoc/extern.h,v retrieving revision 1.24 retrieving revision 1.25 diff -Lextern.h -Lextern.h -u -p -r1.24 -r1.25 --- extern.h +++ extern.h @@ -55,6 +55,7 @@ enum texicmd { TEXICMD_AT, TEXICMD_AUTHOR, TEXICMD_B, + TEXICMD_BACKSLASH, TEXICMD_BANG, TEXICMD_BULLET, TEXICMD_BYE, -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv