diff options
author | Karl Berry <karl@gnu.org> | 1996-11-09 23:37:11 +0000 |
---|---|---|
committer | Karl Berry <karl@gnu.org> | 1996-11-09 23:37:11 +0000 |
commit | 10011ce2890bbac3b5f968a98a9547aa3c8e0823 (patch) | |
tree | c1a64d87ce3c9b4cf590d6e455326ec08a2b6f8d | |
parent | 84a9fd68b7b664c71b8ee1a09f86508ab5025d43 (diff) | |
download | gunmake-10011ce2890bbac3b5f968a98a9547aa3c8e0823.tar.gz |
(\set, \value): Allow - and _ in @set variable names.
-rw-r--r-- | texinfo.tex | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/texinfo.tex b/texinfo.tex index 22d0ae0..8e2ce6e 100644 --- a/texinfo.tex +++ b/texinfo.tex @@ -868,7 +868,9 @@ where each line of input produces a line of output.} % didn't need it. Make sure the catcode of space is correct to avoid % losing inside @example, for instance. % -\def\set{\begingroup\catcode` =10 \parsearg\setxxx} +\def\set{\begingroup\catcode` =10 + \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. + \parsearg\setxxx} \def\setxxx#1{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% \def\temp{#2}% @@ -889,10 +891,16 @@ where each line of input produces a line of output.} % @value{foo} gets the text saved in variable foo. % -\def\value#1{\expandafter - \ifx\csname SET#1\endcsname\relax - {\{No value for ``#1''\}} - \else \csname SET#1\endcsname \fi} +\def\value{\begingroup + \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. + \parsearg\valuexxx} +\def\valuexxx#1{% + \expandafter\ifx\csname SET#1\endcsname\relax + {\{No value for ``#1''\}}% + \else + \csname SET#1\endcsname + \fi +\endgroup} % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. |