2005-06-21 Stepan Kasal * lib/m4sugar/m4sugar.m4 (m4_split): If the parameter is empty, expand to the empty list. Don't use two pairs of m4_changequote, it's not necessary. Index: lib/m4sugar/m4sugar.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sugar.m4,v retrieving revision 2.91 diff -u -r2.91 m4sugar.m4 --- lib/m4sugar/m4sugar.m4 8 Jun 2005 18:54:24 -0000 2.91 +++ lib/m4sugar/m4sugar.m4 21 Jun 2005 15:34:12 -0000 @@ -1364,11 +1364,11 @@ # # REGEXP specifies where to split. Default is [\t ]+. # -# Pay attention to the m4_changequotes. Inner m4_changequotes exist for -# obvious reasons (we want to insert square brackets). Outer -# m4_changequotes are needed because otherwise the m4 parser, when it -# sees the closing bracket we add to the result, believes it is the -# end of the body of the macro we define. +# If STRING is empty, the result is an empty list. +# +# Pay attention to the m4_changequotes. When m4 reads the definition of +# m4_split, it still has quotes set to [ and ]. Luckily, these are matched +# in the macro body, so the definition is stored correctly. # # Also, notice that $1 is quoted twice, since we want the result to # be quoted. Then you should understand that the argument of @@ -1379,16 +1379,17 @@ # m4_split([active active ])end # => [active], [active], []end -m4_changequote(<<, >>) -m4_define(<>, -<>) -m4_changequote([, ]) +m4_changequote([, ])])