autoconf-patches
[Top][All Lists]
Advanced

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

19-m4-changequote.patch


From: Akim Demaille
Subject: 19-m4-changequote.patch
Date: 02 Nov 2000 12:24:53 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * m4sugar.m4 (builtin, changecom, changequote, decr, dumpdef)
        (incr, index, indir, len, syscmd, sysval, traceoff, traceon):
        Rename as...
        (m4_builtin, m4_changecom, m4_changequote, m4_decr, m4_dumpdef)
        (m4_incr, m4_index, m4_indir, m4_len, m4_syscmd, m4_sysval)
        (m4_traceoff, m4_traceon): these.
        * autoconf.m4 (builtin, changecom, decr, incr, index, indir, len)
        (syscmd, sysval, traceoff, traceon): Reactivate.
        
        
Index: acgeneral.m4
--- acgeneral.m4 Wed, 01 Nov 2000 13:15:07 +0100 akim (ace/27_acgeneral. 
1.169.8.79 666)
+++ acgeneral.m4 Wed, 01 Nov 2000 13:35:48 +0100 akim (ace/27_acgeneral. 
1.169.8.79 666)
@@ -50,9 +50,6 @@
 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
 
 
-# Some people depend upon sinclude, disabled by m4sugar.
-define([sinclude], [builtin([sinclude], $@)])
-
 ## ---------------- ##
 ## The diversions.  ##
 ## ---------------- ##
Index: autoconf.m4
--- autoconf.m4 Wed, 01 Nov 2000 13:15:07 +0100 akim (ace/28_autoconf.m 1.10 
666)
+++ autoconf.m4 Wed, 01 Nov 2000 13:55:59 +0100 akim (ace/28_autoconf.m 1.10 
666)
@@ -29,12 +29,24 @@
 # M4sugar and M4sh use exclusively the `m4_' prefix, but Autoconf,
 # for historical reasons, uses the old names.
 
+m4_copy_unm4([m4_builtin])
+m4_copy_unm4([m4_changequote])
+m4_copy_unm4([m4_decr])
 m4_copy_unm4([m4_define])
 m4_copy_unm4([m4_defn])
+m4_copy_unm4([m4_incr])
+m4_copy_unm4([m4_index])
+m4_copy_unm4([m4_indir])
+m4_copy_unm4([m4_len])
 m4_copy_unm4([m4_patsubst])
 m4_copy_unm4([m4_popdef])
 m4_copy_unm4([m4_pushdef])
 m4_copy_unm4([m4_regexp])
+m4_copy_unm4([m4_sinclude])
+m4_copy_unm4([m4_syscmd])
+m4_copy_unm4([m4_sysval])
+m4_copy_unm4([m4_traceoff])
+m4_copy_unm4([m4_traceon])
 m4_copy_unm4([m4_translit])
 m4_copy_unm4([m4_undefine])
 
Index: m4sugar.m4
--- m4sugar.m4 Wed, 01 Nov 2000 13:15:07 +0100 akim (ace/b/27_libm4.m4 1.29 644)
+++ m4sugar.m4 Wed, 01 Nov 2000 14:01:19 +0100 akim (ace/b/27_libm4.m4 1.29 644)
@@ -108,10 +108,19 @@ define([m4_undefine], defn([undefine]))
 
 # Some m4 internals have names colliding with tokens we might use.
 # Rename them a` la `m4 --prefix-builtins'.
+m4_rename_m4([builtin])
+m4_rename_m4([changecom])
+m4_rename_m4([changequote])
 m4_rename_m4([debugfile])
 m4_rename_m4([debugmode])
+m4_rename_m4([decr])
+m4_rename_m4([dumpdef])
 m4_rename_m4([eval])
 m4_rename_m4([format])
+m4_rename_m4([incr])
+m4_rename_m4([index])
+m4_rename_m4([indir])
+m4_rename_m4([len])
 m4_rename([m4exit], [m4_exit])
 m4_rename([m4wrap], [m4_wrap])
 m4_rename_m4([maketemp])
@@ -122,6 +131,10 @@ define([m4_undefine], defn([undefine]))
 m4_rename_m4([shift])
 m4_rename_m4([substr])
 m4_rename_m4([symbols])
+m4_rename_m4([syscmd])
+m4_rename_m4([sysval])
+m4_rename_m4([traceoff])
+m4_rename_m4([traceon])
 m4_rename_m4([translit])
 
 
@@ -269,7 +282,7 @@ define([m4_undefine], defn([undefine]))
 # As the builtin include, but warns against multiple inclusions.
 m4_define([m4_include],
 [m4_include_unique([$1])dnl
-builtin([include], [$1])])
+m4_builtin([include], [$1])])
 
 
 # m4_sinclude(FILE)
@@ -277,7 +290,7 @@ define([m4_undefine], defn([undefine]))
 # As the builtin sinclude, but warns against multiple inclusions.
 m4_define([m4_sinclude],
 [m4_include_unique([$1])dnl
-builtin([sinclude], [$1])])
+m4_builtin([sinclude], [$1])])
 
 # Neutralize include and sinclude.
 m4_undefine([include])
@@ -428,7 +441,7 @@ define([m4_undefine], defn([undefine]))
 m4_define([_m4_dumpdefs_up],
 [ifdef([$1],
        [m4_pushdef([_m4_dumpdefs], m4_defn([$1]))dnl
-dumpdef([$1])dnl
+m4_dumpdef([$1])dnl
 m4_popdef([$1])dnl
 _m4_dumpdefs_up([$1])])])
 
@@ -444,7 +457,7 @@ define([m4_undefine], defn([undefine]))
 
 # m4_dumpdefs(NAME)
 # -----------------
-# Similar to `dumpdef(NAME)', but if NAME was m4_pushdef'ed, display its
+# Similar to `m4_dumpdef(NAME)', but if NAME was m4_pushdef'ed, display its
 # value stack (most recent displayed first).
 m4_define([m4_dumpdefs],
 [_m4_dumpdefs_up([$1])dnl
@@ -469,7 +482,7 @@ define([m4_undefine], defn([undefine]))
 # invocations inside strings with [] blocks (for instance regexps and
 # help-strings).
 m4_define([m4_noquote],
-[changequote(-=<{,}>=-)$1-=<{}>=-changequote([,])])
+[m4_changequote(-=<{,}>=-)$1-=<{}>=-m4_changequote([,])])
 
 
 ## -------------------------- ##
@@ -1113,7 +1126,7 @@ define([m4_undefine], defn([undefine]))
 #   it passes to `AC_LANG_COMPILER(C)'.
 m4_define([_m4_require],
 [m4_pushdef([_m4_expansion_stack],
-         m4_location[: $1 is required by...])dnl
+            m4_location[: $1 is required by...])dnl
 ifdef([_m4_expanding($1)],
       [m4_fatal([m4_require: circular dependency of $1])])dnl
 ifndef([_m4_divert_dump],
@@ -1193,9 +1206,9 @@ define([m4_undefine], defn([undefine]))
 #
 # REGEXP specifies where to split.  Default is [\t ]+.
 #
-# Pay attention to the changequotes.  Inner changequotes exist for
+# Pay attention to the m4_changequotes.  Inner m4_changequotes exist for
 # obvious reasons (we want to insert square brackets).  Outer
-# changequotes are needed because otherwise the m4 parser, when it
+# 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.
 #
@@ -1208,16 +1221,16 @@ define([m4_undefine], defn([undefine]))
 #   m4_split([active active ])end
 #   => [active], [active], []end
 
-changequote(<<, >>)
+m4_changequote(<<, >>)
 m4_define(<<m4_split>>,
-<<changequote(``, '')dnl
+<<m4_changequote(``, '')dnl
 [dnl Can't use m4_default here instead of ifelse, because m4_default uses
 dnl [ and ] as quotes.
 m4_patsubst(````$1'''',
            ifelse(``$2'',, ``[         ]+'', ``$2''),
            ``], ['')]dnl
-changequote([, ])>>)
-changequote([, ])
+m4_changequote([, ])>>)
+m4_changequote([, ])
 
 
 
@@ -1366,18 +1379,19 @@ define([m4_undefine], defn([undefine]))
 [m4_pushdef([m4_Prefix], m4_default([$2], []))dnl
 m4_pushdef([m4_Prefix1], m4_default([$3], [m4_Prefix]))dnl
 m4_pushdef([m4_Width], m4_default([$4], 79))dnl
-m4_pushdef([m4_Cursor], len(m4_Prefix1))dnl
+m4_pushdef([m4_Cursor], m4_len(m4_Prefix1))dnl
 m4_pushdef([m4_Separator], [])dnl
 m4_Prefix1[]dnl
-ifelse(m4_eval(m4_Cursor > len(m4_Prefix)),
-       1, [m4_define([m4_Cursor], len(m4_Prefix))
+ifelse(m4_eval(m4_Cursor > m4_len(m4_Prefix)),
+       1, [m4_define([m4_Cursor], m4_len(m4_Prefix))
 m4_Prefix])[]dnl
 m4_foreach_quoted([m4_Word], (m4_split(m4_strip(m4_join([$1])))),
 [m4_define([m4_Cursor], m4_eval(m4_Cursor + len(m4_Word) + 1))dnl
 dnl New line if too long, else insert a space unless it is the first
 dnl of the words.
 ifelse(m4_eval(m4_Cursor > m4_Width),
-       1, [m4_define([m4_Cursor], m4_eval(len(m4_Prefix) + len(m4_Word) + 1))]
+       1, [m4_define([m4_Cursor],
+                     m4_eval(m4_len(m4_Prefix) + m4_len(m4_Word) + 1))]
 m4_Prefix,
        [m4_Separator])[]dnl
 m4_Word[]dnl



reply via email to

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