Add .gitignore
[texinfo-docstrings.git] / macros.texinfo
blob95f47cf9d10631904355da2b75af76e77c704326
1 @c Some plain TeX macrology to wrap text in \hbox{} only if the text
2 @c contains no hyphens.
3 @iftex
4 @tex
5 \newif\ifdash
6 \long\def\dashp#1{\expandafter\setnext#1-\dashphelper}
7 \long\def\setnext#1-{\futurelet\next\dashphelper}
8 \long\def\dashphelper#1\dashphelper{
9   \ifx\dashphelper\next\dashfalse\else\dashtrue\fi
11 \def\lw#1{\leavevmode\dashp{#1}\ifdash#1\else\hbox{#1}\fi}
12 @end tex
13 @end iftex
15 @c A Texinfo binding for the plain TeX above.  Analogous to Texinfo's
16 @c @w, but for Lisp symbols.  AFAICT, the comment characters are
17 @c necessary to prevent treating the newline as a space.
18 @macro lw{word}
19 @iftex
20 @tex
21 \\lw{\word\}%
22 @end tex
23 @end iftex
24 @ifnottex
25 \word\@c
26 @end ifnottex
27 @end macro