texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[7627] skip space after macro name


From: gavinsmith0123
Subject: [7627] skip space after macro name
Date: Sat, 14 Jan 2017 10:12:16 -0500 (EST)

Revision: 7627
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7627
Author:   gavin
Date:     2017-01-14 10:12:15 -0500 (Sat, 14 Jan 2017)
Log Message:
-----------
skip space after macro name

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/doc/texinfo.tex

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2017-01-13 23:06:59 UTC (rev 7626)
+++ trunk/ChangeLog     2017-01-14 15:12:15 UTC (rev 7627)
@@ -1,3 +1,12 @@
+2017-01-14  Gavin Smith  <address@hidden>
+
+       * doc/texinfo.tex (\endlineisspace): New.
+       (\defmacro) <0 arguments> Skip any whitespace after the macro 
+       name.
+       (\scanmacro): Remove code for propagating a final @comment in
+       a macro body.
+       (\comment): Give the same definition as \c.
+
 2017-01-13  Gavin Smith  <address@hidden>
 
        * tp/Texinfo/Convert/XSParagraph/xspara.c (xspara_set_state),

Modified: trunk/doc/texinfo.tex
===================================================================
--- trunk/doc/texinfo.tex       2017-01-13 23:06:59 UTC (rev 7626)
+++ trunk/doc/texinfo.tex       2017-01-14 15:12:15 UTC (rev 7627)
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2016-09-18.18}
+\def\texinfoversion{2017-01-14.15}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -165,6 +165,9 @@
 % Give the space character the catcode for a space.
 \def\spaceisspace{\catcode`\ =10\relax}
 
+% Likewise for ^^M, the end of line character.
+\def\endlineisspace{\catcode13=10\relax}
+
 \chardef\dashChar  = `\-
 \chardef\slashChar = `\/
 \chardef\underChar = `\_
@@ -950,21 +953,14 @@
 % @comment ...line which is ignored...
 % @c is the same as @comment
 % @ignore ... @end ignore  is another way to write a comment
-%
-\def\comment{\begingroup \catcode`\^^M=\active%
address@hidden \catcode`\{=\other \catcode`\}=\other\commentxxx}%
 
-{\catcode`\^^M=\active%
-\gdef\commentxxx#1^^M{\endgroup%
-\futurelet\nexttoken\commentxxxx}%
-\gdef\commentxxxx{\ifx\nexttoken\aftermacro\expandafter\comment\fi}%
-}
 
 \def\c{\begingroup \catcode`\^^M=\active%
 address@hidden \catcode`\{=\other \catcode`\}=\other%
 \cxxx}
 {\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}}
-% See comment in \scanmacro about why the definitions of @c and @comment differ
+%
+\let\comment\c
 
 % @paragraphindent NCHARS
 % We'll use ems for NCHARS, close enough.
@@ -8031,9 +8027,6 @@
   }
 \fi
 
-\let\aftermacroxxx\relax
-\def\aftermacro{\aftermacroxxx}
-
 % alias because \c means cedilla in @tex or @math
 \let\texinfoc=\c
 
@@ -8055,7 +8048,7 @@
   \catcode`\\=\active
   %
   % Process the macro body under the current catcode regime.
-  address@hidden
+  address@hidden
   %
   address@hidden
   \catcode`\\=\savedcatcodetwo
@@ -8062,11 +8055,6 @@
   %
   % The \texinfoc is to remove the \newlinechar added by \scantokens, and
   % can be noticed by \parsearg.
-  %   The \aftermacro allows a \comment at the end of the macro definition
-  % to duplicate itself past the final \newlinechar added by \scantokens:
-  % this is used in the definition of \group to comment out a newline.  We
-  % don't do the same for \c to support Texinfo files with macros that ended
-  % with a @c, which should no longer be necessary.
   %   We avoid surrounding the call to \scantokens with \bgroup and \egroup
   % to allow macros to open or close groups themselves.
 }
@@ -8538,6 +8526,13 @@
   \ifcase\paramno
   % 0
     \expandafter\xdef\csname\the\macname\endcsname{%
+      \bgroup
+        \noexpand\spaceisspace
+        \noexpand\endlineisspace
+        \noexpand\expandafter % skip any whitespace after the macro name.
+        \expandafter\noexpand\csname\the\macname @@@\endcsname}%
+    \expandafter\xdef\csname\the\macname @@@\endcsname{%
+      \egroup
       \noexpand\scanmacro{\macrobody}}%
   \or % 1
     \expandafter\xdef\csname\the\macname\endcsname{%




reply via email to

[Prev in Thread] Current Thread [Next in Thread]