m4-commit
[Top][All Lists]
Advanced

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

Changes to m4/doc/m4.texinfo,v


From: Eric Blake
Subject: Changes to m4/doc/m4.texinfo,v
Date: Fri, 07 Sep 2007 22:37:48 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      07/09/07 22:37:47

Index: doc/m4.texinfo
===================================================================
RCS file: /sources/m4/m4/doc/m4.texinfo,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -b -r1.110 -r1.111
--- doc/m4.texinfo      10 Aug 2007 15:09:46 -0000      1.110
+++ doc/m4.texinfo      7 Sep 2007 22:37:46 -0000       1.111
@@ -236,6 +236,7 @@
 * M4modules::                   Listing loaded modules
 * Load::                        Loading additional modules
 * Unload::                      Removing loaded modules
+* Refcount::                    Tracking module references
 * Standard Modules::            Standard bundled modules
 
 Macros for text handling
@@ -5485,6 +5486,7 @@
 * M4modules::                   Listing loaded modules
 * Load::                        Loading additional modules
 * Unload::                      Removing loaded modules
+* Refcount::                    Tracking module references
 * Standard Modules::            Standard bundled modules
 @end menu
 
@@ -5542,7 +5544,7 @@
 @section Removing loaded modules
 
 @deffn {Builtin (load)} unload (@var{module-name})
-Any loaded modules that can be listed by the @code{modules} macro can be
+Any loaded modules that can be listed by the @code{m4modules} macro can be
 removed by naming them as the @var{module-name} parameter of the
 @code{unload} macro.  Unloading a module consists of removing all of the
 macros it provides from the internal table of visible macros, and
@@ -5562,6 +5564,49 @@
 @result{}load,gnu,m4
 @end example
 
address@hidden Refcount
address@hidden Tracking module references
+
address@hidden {Builtin (load)} refcount (@var{module-name})
+This macro expands to an integer representing the number of times
address@hidden has been loaded but not yet unloaded.  No warning is
+issued, even if @var{module-name} does not represent a valid module.
+
+The macro @code{refcount} is recognized only with parameters.
address@hidden deffn
+
+This example demonstrates tracking the reference count of the gnu
+module.
+
address@hidden options: -m load
address@hidden
+$ @kbd{m4 -m load}
+m4modules
address@hidden,gnu,m4
+refcount(`gnu')
address@hidden
+m4modules
address@hidden,gnu,m4
+load(`gnu')
address@hidden
+refcount(`gnu')
address@hidden
+unload(`gnu')
address@hidden
+m4modules
address@hidden,gnu,m4
+refcount(`gnu')
address@hidden
+unload(`gnu')
address@hidden
+m4modules
address@hidden,m4
+refcount(`gnu')
address@hidden
+refcount(`NoSuchModule')
address@hidden
address@hidden example
+
 @node Standard Modules
 @section Standard bundled modules
 




reply via email to

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