]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* libm4.m4 (m4_namespace_define): Fix a bug: `m4_namespace'
authorAkim Demaille <akim@epita.fr>
Tue, 8 Feb 2000 12:43:47 +0000 (12:43 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 8 Feb 2000 12:43:47 +0000 (12:43 +0000)
instead of `$1'.
Simplify some excess in quoting.
Use NAMESPACE::MACRONAME instead of `m4_defn(NAMESPACE,
MACRONAME)'.

ChangeLog
libm4.m4

index 1a50fc96714369b1a18fb0f719bcb1d4e5b4df2a..7e6e54e9cdc263a6a2196d8e6cc8e999681ddb78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-02-08  Akim Demaille  <akim@epita.fr>
+
+       * libm4.m4 (m4_namespace_define): Fix a bug: `m4_namespace'
+       instead of `$1'.
+       Simplify some excess in quoting.
+       Use NAMESPACE::MACRONAME instead of `m4_defn(NAMESPACE,
+       MACRONAME)'.
+
 2000-02-08  Akim Demaille  <akim@epita.fr>
 
        Adapt autoheader to use libm4's namespaces.
index 17cc0cf87a962355da737f4d2a597e26976dc9a8..49d3d5ef84871d8fdb91cb32dc31b64ced42e134 100644 (file)
--- a/libm4.m4
+++ b/libm4.m4
@@ -84,12 +84,11 @@ define([m4_defn],     defn([defn]))
 # (i.e., all the definitions it holds).
 
 # Technically, to define a MACRO in NAMESPACE means to define the
-# macro named `m4_defn(NAMESPACE, MACRO)' to the VALUE.  At the same
-# time, we append `undefine(NAME)' in the macro named
-# `m4_disable(NAMESPACE)', and similarly a binding of NAME to the
-# value of `m4_defn(NAMESPACE, MACRO)' in `m4_enable(NAMESPACE)'.
-# These mechanisms allow to bind the macro of NAMESPACE and to unbind
-# them at will.
+# macro named `NAMESPACE::MACRO' to the VALUE.  At the same time, we
+# append `undefine(NAME)' in the macro named `m4_disable(NAMESPACE)',
+# and similarly a binding of NAME to the value of `NAMESPACE::MACRO'
+# in `m4_enable(NAMESPACE)'.  These mechanisms allow to bind the
+# macro of NAMESPACE and to unbind them at will.
 
 # Of course this implementation is not really efficient: m4 has to
 # grow strings which can become quickly huge, which slows it
@@ -117,13 +116,13 @@ m4_namespace_push([libm4])
 # Assign VALUE to NAME in NAMESPACE, and append the binding/unbinding
 # in `m4_disable(NAMESPACE)'/`m4_enable(NAMESPACE)'.
 m4_define([m4_namespace_define],
-[m4_define([m4_defn([$1], [$2])], [$3])dnl
+[m4_define([$1::$2], [$3])dnl
 m4_define([m4_disable($1)],
 defn([m4_disable($1)])dnl
 [m4_undefine([$2])])dnl
 m4_define([m4_enable($1)],
-defn([m4_enable(]m4_namespace[)])dnl
-[m4_define([$2], defn([m4_defn([$1], [$2])]))])dnl
+defn([m4_enable($1)])dnl
+[m4_define([$2], defn([$1::$2]))])dnl
 ])