[Top][All Lists]
[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, 12 Jan 2007 23:07:28 +0000 |
CVSROOT: /sources/m4
Module name: m4
Changes by: Eric Blake <ericb> 07/01/12 23:07:27
Index: doc/m4.texinfo
===================================================================
RCS file: /sources/m4/m4/doc/m4.texinfo,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -b -r1.90 -r1.91
--- doc/m4.texinfo 9 Jan 2007 05:10:19 -0000 1.90
+++ doc/m4.texinfo 12 Jan 2007 23:07:27 -0000 1.91
@@ -1257,18 +1257,21 @@
@code{m4} offers several mechanisms or techniques for inhibiting the
recognition of names as macro calls.
-First of all, many builtin macros cannot meaningfully be called
-without arguments. For any of these macros, whenever an opening
-parenthesis does not immediately follow their name, the builtin macro
-call is not triggered. This solves the most usual cases, like for
address@hidden or @samp{eval}. Later in this document, the sentence
-``This macro is recognized only with parameters'' refers to this
-specific provision.
-
address@hidden FIXME - The feature of blind macros is incompatible with
address@hidden @acronym{POSIX} and @comment traditional implementations.
address@hidden Should we suppress it with the @comment @option{--traditional}
address@hidden or @option{-G} command line option?
address@hidden @acronym{GNU} extensions
address@hidden blind macro
address@hidden macro, blind
+First of all, many builtin macros cannot meaningfully be called without
+arguments. As a @acronym{GNU} extension, for any of these macros,
+whenever an opening parenthesis does not immediately follow their name,
+the builtin macro call is not triggered. This solves the most usual
+cases, like for @samp{include} or @samp{eval}. Later in this document,
+the sentence ``This macro is recognized only with parameters'' refers to
+this specific provision of @acronym{GNU} M4, also known as a blind
+builtin macro. For the builtins defined by @acronym{POSIX} that bear
+this disclaimer, @acronym{POSIX} specifically states that invoking those
+builtins without arguments is unspecified, because many other
+implementations simply invoke the builtin as though it were given one
+empty argument instead.
@example
$ @kbd{m4}
@@ -1278,16 +1281,6 @@
@result{}1
@end example
address@hidden options: -G
address@hidden xfail
address@hidden
-$ @kbd{m4 -G}
-eval
address@hidden
-eval(`1')
address@hidden
address@hidden example
-
There is also a command line option (@option{--prefix-builtins}, or
@option{-P}, @pxref{Operation modes, , Invoking m4}) that renames all
builtin macros with a prefix of @samp{m4_} at startup. The option has
@@ -2588,10 +2581,12 @@
@result{}false
@end example
address@hidden macro, blind
address@hidden blind macro
Notice how the first argument was used unquoted; it is common to compare
the expansion of a macro with a string. With this macro, you can now
-reproduce the behavior of many of the builtins, where the macro is
-recognized only with arguments.
+reproduce the behavior of blind builtins, where the macro is recognized
+only with arguments.
@example
define(`foo', `ifelse(`$#', `0', ``$0'', `arguments:$#')')
- Changes to m4/doc/m4.texinfo,v, Eric Blake, 2007/01/03
- Changes to m4/doc/m4.texinfo,v, Eric Blake, 2007/01/06
- Changes to m4/doc/m4.texinfo,v, Eric Blake, 2007/01/09
- Changes to m4/doc/m4.texinfo,v,
Eric Blake <=
- Changes to m4/doc/m4.texinfo,v, Eric Blake, 2007/01/13
- Changes to m4/doc/m4.texinfo,v, Eric Blake, 2007/01/15
- Changes to m4/doc/m4.texinfo,v, Eric Blake, 2007/01/23