changeset 5334:c6b509e118ef

update from texinfo
author Karl Berry <karl@freefriends.org>
date Fri, 08 Oct 2004 13:14:35 +0000
parents f038f3333cc8
children 7d27347df06b
files config/texinfo.tex
diffstat 1 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/config/texinfo.tex
+++ b/config/texinfo.tex
@@ -2314,15 +2314,26 @@
 % @table, @ftable, @vtable.
 \envdef\table{%
   \let\itemindex\gobble
-  \tablex
+  \tablecheck{table}%
 }
 \envdef\ftable{%
   \def\itemindex ##1{\doind {fn}{\code{##1}}}%
-  \tablex
+  \tablecheck{ftable}%
 }
 \envdef\vtable{%
   \def\itemindex ##1{\doind {vr}{\code{##1}}}%
-  \tablex
+  \tablecheck{vtable}%
+}
+\def\tablecheck#1{%
+  \ifnum \the\catcode`\^^M=\active
+    \endgroup
+    \errmessage{This command won't work in this context; perhaps the problem is
+      that we are \inenvironment\thisenv}%
+    \def\next{\doignore{#1}}%
+  \else
+    \let\next\tablex
+  \fi
+  \next
 }
 \def\tablex#1{%
   \def\itemindicate{#1}%