* ltdl/m4/.cvsignore: Update.
[m4.git] / NEWS
blob3bcd3c7e89443db46b19bd7a417a5d45957e9115
1 GNU m4 NEWS - History of user-visible changes.          -*- outline -*-
2 Copyright (C) 1992, 1993, 1994, 1998, 2000, 2001, 2006, 2007 Free Software
3 Foundation, Inc.
5 * Version beta 1.9b - ???, by ??? (CVS version 1.9a)
7 NOTE - there are still a number of FIXMEs to resolve before this can be
8 promoted to 2.0.
10 ** Building M4
12 *** The build environment has been updated to modern GNU practices,
13     depending on newer features of Autoconf, Automake, Libtool, Gettext,
14     and Gnulib to be more portable to a wide variety of platforms.
16 ** New command line behavior
18 *** If the POSIXLY_CORRECT environment variable is set, it implies the
19     `-G' and `-Q' options, effectively giving a more fully POSIX-compliant
20     implementation with only compatible GNU extensions.
22 *** New `-b'/`--batch' command-line option to force non-interactive mode.
23     Also, in addition to `-e'/`--interactive' requesting interactive mode,
24     m4 now follows the lead of sh, and automatically enters interactive
25     mode when there are no files specified, and when both standard input
26     and standard error are terminals.
28 *** New `-B'/`--prepend-include' command-line option allows prepending to
29     the include path, rather than always searching `.' first.
31 *** The `-d'/`--debug' command-line option now understands `-' and `+'
32      modifiers, the way `debugmode' has always done.  The option
33     `--debugmode' is added as an alias for `-d'.
35 *** New `--debuglen' command-line option matches the spelling of a new
36     macro, and the old spelling `--arglength' now issues a warning that it
37     might be withdrawn in the future.
39 *** New `-g'/`--gnu' command-line option overrides `-G'/`--traditional',
40     allowing the GNU module to be selected even when POSIXLY_CORRECT.
42 *** The `-H'/`--hashsize' command-line options, which were made no-ops in
43     a previous beta, now issue a deprecation warning.
45 *** The `-L'/`--nesting-limit' command-line option now performs argument
46     validation and accepts an optional multiplier suffix.
48 *** The `-o'/`--error-output' command-line options, which were replaced by
49     `--debugfile' in M4 1.4.7, now issue a deprecation warning.  This
50     warning interferes with all versions of Autoconf prior to 2.61, so plan
51     on installing an updated Autoconf when installing M4 2.0.
53 *** New `-p'/`--pushdef' and `--popdef' command-line options allow more
54     control over macro definitions from the command line between input
55     files.
57 *** New `--posix' command-line option is a synonym for `-G'/`--traditional'.
59 *** New `-r'/`--regexp-syntax' command-line option changes the default
60     regular expression syntax used by M4.  Without this option, M4
61     continues to use EMACS style expressions.  A new section in the info
62     docs explains the differences between them, and what builtins are
63     affected.
65 *** New `--safer' command-line option cripples the potentially unsafe
66     builtins `debugfile', `esyscmd', `maketemp', `mkdtemp', `mkstemp', and
67     `syscmd'.
69 *** New `--syncoutput' command-line option matches the builtin added in a
70     previous beta, and provides more control over sync line generation
71     from the command line between input files.  The previous options
72     `-s'/`--synclines' remain as aliases for `--syncoutput=1'.
74 *** New `--traceoff' command-line option, and new spelling `--traceon' for
75     `--trace', allow more control over macro tracing from the command line
76     between input files.
78 *** New `--unload-module' command-line option allows more control over
79     dynamic modules from the command line.  Also, `-m'/`--load-module' now
80     acts between input files.
82 *** New `--warnings' command-line option re-enables warnings, overriding
83     `-Q'/`--quiet'/`--silent', allowing warnings even when POSIXLY_CORRECT.
85 ** POSIX conformance
87 *** POSIXLY_CORRECT and `m4 --traditional' now makes the `define' builtin
88   replace all `pushdef'ed values of a macro.
89   - FIXME: The Austin group clarified that this was never a POSIX
90   requirement; consider reverting this change.
92 *** The `defn' builtin now allows any number of arguments, as POSIX requires.
93   - FIXME: This still doesn't work with concatenating builtins with text.
95 *** The `eval' builtin now follows C precedence rules.  Additionally,
96     short-circuit operators correctly short-circuit division by zero.
98   - FIXME: POSIX recommends using ${10} instead of $10 for the tenth
99   positional argument.  We should deprecate $10.
101  - FIXME: `m4wrap' semantics need an update to FIFO.
103 ** Removed builtins
105 *** The experimental `epatsubst' and `eregexp' builtins have been removed
106     in favor of a new `changeresyntax' builtin.
108 ** New builtins
110 *** New `changeresyntax' builtin allows programmtic setting of the default
111     regular expression flavor, to match `-r'/`--regexp-syntax' command-line
112     option.
114 *** New `debuglen' builtin is introduced which allows runtime setting of
115     debug output length, previously controlled only by the `-l' command
116     line argument.  Additionally, whether using the new macro or the
117     command line argument, the length limitation now affects dumpdef output
118     as well as trace output, undergoes argument validation, and accepts an
119     optional multiplier suffix.
120   - FIXME the multiplier suffix isn't reliable yet
122 *** New `mkdtemp' builtin parallels `mkstemp', but allows the creation of
123     temporary directories instead of files.
125 *** New `renamesyms' builtin allows programmatic renaming of all symbols
126     according to a regular expression.
127   - FIXME: This feature can cause core dumps when renaming multiple
128   symbols to the same name.
130 *** New `__traditional__' builtin identifies when the traditional module
131     is loaded instead of the gnu module.
133 *** The `modules' and `symbols' builtins, introduced in previous betas,
134     have been renamed `m4modules' and `m4symbols', in order to minimize
135     problems when upgrading from 1.4.x and processing English text.  To
136     prevent future problems, any future macro added as a GNU extension will
137     either be blind (ie. be unrecognized without arguments), or begin with
138     the prefix `m4' or `__'.
140 ** Changed behavior of builtins
142 *** The '$' syntax class to the `changeresyntax' builtin is now enabled.
143     See the manual for examples.
145 *** The `builtin' builtin now has a special form, where if the first
146     argument is exactly the special token representing defn(`builtin'), the
147     expansion is the special token representing the builtin named in the
148     second argument.  This allows regenerating a macro with a more
149     efficient mapping directly to a builtin function, rather than through
150     textual indirection through further expansions of `builtin'.
152 *** The `changecom' builtin semantics now match traditional
153     implementations; if the start-comment string resembles a macro name or
154     the start-quote string, comments are effectively disabled.
156 *** The `changesyntax' builtin has been improved, to make it easier to add
157     and remove characters from a syntax class without having to specify the
158     entire set of characters in that class.
160 *** New `m' flag to `-d'/`--debug' command-line option or `debugmode'
161     builtin traces actions related to module loading and unloading, and
162     affects `dumpdef' and trace output to show where builtins come from.
163     New `s' flag shows the entire stack of `pushdef' definitions during
164     `dumpdef'.  The `c' flag has been updated to output two lines instead
165     of three (since the last two had always been paired), and to add
166     information to the first line to show the definition of the macro being
167     expanded.  The 'e' flag has been updated to output non-text expansions.
169 *** The `dumpdef' builtin now always outputs to standard error, rather than
170     the debug file specified by the `--debugfile' option or `debugfile'
171     macro.
173 *** The `eval' and `mpeval' builtins now support the following new
174     operators: `>>>', `\', `?:', and  `,'.  However, when complying
175     strictly with POSIX, `?:' and `,' are rejected inside `eval'.
177 *** The `maketemp' builtin now always warns that it is obsolete, even in GNU
178     mode where it uses the same secure algorithm as `mkstemp', because of
179     the recommendation of POSIX to obsolete `maketemp' as inherently
180     insecure when obeying POSIX.
182 *** The `patsubst' and `regexp' builtins have a new optional 4th argument
183     to use a different regular expression syntax for the duration of that
184     invocation.
186 *** The semantics of the `traceon' and `traceoff' builtins now match
187     traditional implementations: when called without arguments, they affect
188     global state rather than affecting only the macros defined at that
189     moment.  The manual includes an example of how to recover 1.4.x
190     semantics.
192 ** Other changes
194 *** The syntax of frozen files format V2 has been improved to save
195     additional state.
196   - FIXME: format 2 still needs to be tweaked to allow complete ASCII
197   representation and to catch any more missing state; once 2.0 is released,
198   any further changes would introduce format 3.
200 FIXME: include the (long) list of changes in 1.4.x that were not already
201   in earlier betas.
202 * Version 1.4.9
203 * Version 1.4.8
204 * Version 1.4.7
205 * Version 1.4.6
206 * Version 1.4.5
208 * Version beta 1.4q - August 2001, by Gary V. Vaughan
210 ** Support for the experimental `changeword' has been dropped.
212 ** `m4 --hashsize' and `-H' are still accepted, but have no effect.  M4
213    will grow its internal symbol table if the symbol density is having an
214    effect on performance.
216 ** `configure --without-modules' will build an m4 binary with no preloaded
217    modules.  At startup it will search for and load modules `m4' and either
218    `gnu' or `traditional'.  This mode of operation can be used for
219    development and debugging of the base modules without the need to
220    recompile all of m4 with each modification.
222 ** `configure --with-modules="gnu m4 traditional load"', for example,
223    will build an m4 binary with the named modules preloaded, ready to be
224    activated (even on static lib only machines) with the `-m' option or
225    using the `load' builtin.
227 ** M4 has no builtins or macros in core, they are all loaded from modules
228    at startup.  This means that modules are no longer optional, though the
229    standard build will statically link the modules `m4', `gnu' and
230    `traditional', so even on machines with no ltdl support, all of the
231    functionality from previous releases is available.
233 ** New builtin `load' to dynamically load modules which can define new
234    builtins and user macros.
236 ** New builtin `unload' to remove loaded modules (and the builtins and user
237    macros they define) from the running m4 interpreter.
239 ** New builtins `eregexp' and `epatsubst' to use Extended Regular
240    Expressions syntax in lieu of Basic Regular Expressions as used by
241    `regexp' and `patsubst'.
243 ** The names of all currently loaded modules are returned by the new
244    builtin, ``modules''.
246 ** Loadable modules can define new builtin functions or text expansion
247    macros.
249 ** The module code has been rewritten to use libltdl, the libtool dynamic
250    loader, which means GNU m4 can now load (and unload) modules just about
251    anywhere which it can be built.  This includes obscure hosts such as
252    cygwin and BeOS, and also on hosts which do not have shared libraries,
253    through preloading (see libtool manual) and GNU dld.
255 ** Modules can now be built without the m4 source being available using the
256    installed m4module.h header file (and some other headers that it
257    includes for you), and the installed libm4.la libtool library.  All
258    symbols exported from libm4.la have a prefix of `m4_' or `M4_'.  See the
259    modules directory for examples of usage.
261 ** A new V2 format for frozen files that saves module and syntax information.
263 * Version beta 1.4o - January 2000, by Rene' Seindal
265 ** Modules can be loaded from the command line with --load-module
267 ** Modules now use libtool's wrapper libltdl.
269 ** New builtin `symbols' allows dynamic queries of all currently defined
270    macros.
272 ** Various Bug fixes.
274 * Version beta 1.4n - November 1998, by Rene' Seindal
276 ** The module code has been reorganised yet again, and now compiles
277    correctly on GNU/Linux, HPUX 9 and 10, SunOS 5 and Solaris 5.
279 ** When configured --with-gmp a new builtin `mpeval' is now defined.  The
280    builtin `eval' retains its normal behaviour.
282 ** m4 --version also shows which options were used for compilation, such as:
283    "GNU m4 1.4n (options: modules gmp changeword)"
285 ** New option --import-environment defines all environment variables as
286    macros.  This is done before -D and -U are handled, so the macros can be
287    changed through these options.
289 ** Error messages now always print program name before input file name as
290    specified by GNU coding standards.  Reported by Akim Demaille.
292 ** Bug fixed: "undivert(0)" could cause m4 to read standard output.  A call
293    of "undivert(0)" is now silently ignored.
295 ** Bug fixed: when compiling --with-included-gettext, <libintl.h> wasn't
296    found in intl/ directory.  Reported by Andrew Bettison.
298 * Version beta 1.4m - November 1998, by Rene' Seindal
300 ** Using libtool for compiling modules and for linking main app.
302 ** Reorganised the dynamic module code to encapsulate system dependencies
303    better.  The code for HPUX shl_load() still needs testing and debugging.
304    A dld interface is also missing.  Any volunteers?
306 ** The files from the GNU m4 web-site is now in examples/WWW as a more
307    complete example of what GNU m4 can do.
309 * Version beta 1.4l - November 1998, by Rene' Seindal
311 ** GNU m4 now has an escape syntax category.  If a character is marked as
312    an escape, words are only recognised as macros if preceded by an escape
313    character.  It is a bit like -P, but dynamic: it can be turned on and
314    off.  The GNU m4 web-site on http://www.seindal.dk/rene/gnu/ is
315    maintained with this feature - the m4 source is available on the site.
317 ** The module interface is improved, thanks to "Brian J. Fox",
318    who has contributed some code from Meta-HTML.  The modules now build
319    automatically and installs properly, by default in
320    /usr/local/libexec/m4.  There is a preliminary, untested support for
321    shl_load().
323 ** There is now a __m4_version__ macro that expands to the current version
324    number.
326 * Version beta 1.4k - November 1998, by Erick Branderhorst and Rene' Seindal
328 ** GNU m4 now uses gettext to support internationalization.
330 ** GNU m4 now uses automake to control Makefile.in generation.  This
331    should make it more consistent with the GNU standards.
333 ** GNU m4 will use the gmp library for multiple precision integral and
334    rational arithmetic in `eval' if configured with `--with-gmp'.  If
335    configured without `--with-gmp' or if gmp is not available, and the type
336    `long long int' is, GNU m4 will use that for `eval' arithmetic.
338 ** GNU m4 now parses the input according to a syntax table, that can be
339    modified through the new builtin `changesyntax'.  It is a generalisation
340    of the existing builtins `changecom' and `changequote'.  The changes are
341    completely backwards compatible (except for the existence of
342    `changesyntax').
344 ** Sync lines can be turned on and off with the `syncoutput' builtin.  The
345    builtin `syncoutput' is a GNU extension.
347 ** New experimental feature: dynamically loadable modules.  New builtin
348    `loadmodules' loads shared libraries, that can define new builtin
349    macros, ie, new macros can be written in C.  Depends on the dlopen()
350    interface, and is currently only tested on Linux.  Enabled at configure
351    time with `--with-modules'.  Documentation is in src/module.c and
352    module/README.
354 ** Implement a GNU message catalog for French (Franc,ois Pinard).
356 ** Filenames found through path searches are now correctly reflected in
357    error and debug messages and through the `__file__' macro.
359 ** Bugs fixed:
361 *** All 8-bit characters can now be used for quotes.
363 FIXME: include the (long) list of changes in 1.4.x that were not already
364   in earlier betas.
365 * Version 1.4.4
366 * Version 1.4.3
367 * Version 1.4.2
368 * Version 1.4.1
370 * Version 1.4 - October 1994, by Franc,ois Pinard
372 ** (No user visible changes)
374 * Version 1.3 - September 1994, by Franc,ois Pinard
376 ** Diversions are created as needed.  Option `-N' is still accepted, but
377    otherwise ignored.  Users should use only negative diversion numbers,
378    instead of high positive numbers, for diverting to nowhere.
380 ** Diversions should also work faster.  No temporary files will be needed
381    at all if all diversions taken altogether do not use more than 512K.
383 ** Frozen state files may be produced with the `--freeze-state' (-F)
384    option and later brought back through the `--reload-state' (-R) option.
386 * Version 1.2 - July 1994, by Franc,ois Pinard
388 ** In patsubst(STRING, REGEXP, REPLACEMENT), \& in REPLACEMENT has been
389    changed to represent this part of STRING matched by the whole REGEXP,
390    instead of the whole STRING as before.  \0 does the same, but emits a
391    diagnostic saying it will disappear in some subsequent release.
393 ** eval(EXPR) emits a diagnostic if EXPR has suffixed crumb.  The same for
394    other numeric conversions in incr(), decr(), divert(), etc.
396 ** `--fatal-warnings' (-E) stops execution at first warning.
398 ** `--nesting-limit=LEVEL' (-L LEVEL) sets a limit to macro nesting.
399    It is initially fixed at 250.
401 ** `--word-regexp=REGEXP' (-W REGEXP) modifies macro name syntax, like
402    does the new `changeword(REGEXP)' macro.  This feature is experimental,
403    tell me your opinions about it.  You do need --enable-changeword at
404    configure time to get these things.  Do *not* depend on them yet.
406 ** Trace output format is scannable by GNU Emacs' next-error function.
408 ** Stack overflow is detected and diagnosed on some capable systems.
410 ** Various bugs have been corrected, m4 should be more portable.  See the
411    ChangeLog for details.
413 * Version 1.1 - November 1993, by Franc,ois Pinard
415 ** Changes which might affect existing GNU m4 scripts:
417 *** Option `-V' has been removed, use `--version' instead.  `--version'
418     writes on standard output instead of standard error, and inhibits any
419     script execution.
421 *** `--no-gnu-extensions' has been renamed `--traditional'.
423 *** In `eval', `^' used to indicate exponentiation, use `**' instead.
425 *** The automatic undiversion which takes place at end of all input is
426     forced into the main output stream.
428 ** Changes which are unlikely to affect existing scripts:
430 *** `--help' prints an usage summary on standard output.  Script execution
431     is then inhibited.
433 *** `--prefix-builtins' (-P) prefixes all builtin macros by `m4_'.
435 *** Most builtin macros for which arguments are mandatory, called without
436     any arguments, are no more recognized as builtin macros: they are
437     consequently copied verbatim to the output stream.
439 *** `define' and `pushdef' are usable with only one argument, they give
440     this argument an empty definition.
442 *** `eval' new operators for binary representation handling: `^' for
443     exclusive-or, `~' for the bitwise negation, `<<' and `>>' for shifts.
445 *** `eval' recognizes the notation 0bDIGITS for binary numbers and the
446     notation 0rRADIX:DIGITS for numbers in any radix from 1 to 36.
448 * Version 1.0.3 - December 1992, by Franc,ois Pinard
450 ** Changes for the user:
452 *** `dnl' outputs a diagnostic if immediately followed by `('.  Usually,
453     `dnl' is followed by newline or whitespace.
455 *** `ifelse' accepts without complaining the common idiom of having only
456     one argument.  This is useful for introducing long comments.
458 *** `eval' always expresses values as signed, whatever the radix.
460 *** M4OPTS environment variable is no longer obeyed.
462 *** `--no-warnings' option is renamed `--silent'.
464 *** Debug lines use a new format more compatible with GNU standards.
466 *** Various bugs have been corrected.  See the ChangeLog for details.
468 ** Changes for the installer:
470 *** GNU m4 now uses an Autoconf-generated configure script, and should be
471     more easily portable in many ways.  (Cray is not supported yet).
473 *** `make check' has been made more portable, expect no errors.
475 ** Changes for the programmer:
477 *** Sources have been fully reindented to comply with GNU standards, and
478     cleaned up in many ways.
480 *** Sources have been protoized.  Non-ANSI compilers are automatically
481     detected, then sources are unprotoized on the fly before compilation.
483 *** GNU m4 uses newer versions of obstack, regex, getopt, etc.
485 * Version 1.0 - October 1991, by Rene' Seindal
487 ** Uses GNU configure, taken from the gdb distribution.
489 ** Uses GNU getopt(), with long option names.
491 ** The -Q/+quiet option is added, which suppresses warnings about missing
492    or superflous arguments to builtin macros.
494 ** Added default options via the M4OPTS environment variable.
496 ** Several minor bugs have been fixed.
498 * Version 0.99 - July 1991, by Rene' Seindal
500 ** The builtins `incr' and `decr' are now implemented without use of
501    `eval'.
503 ** The builtin `indir' is added, to allow for indirect macro calls
504    (allows use of "illegal" macro names).
506 ** The debugging and tracing facilities has been enhanced considerably.
507    See the manual for details.
509 ** The -tMACRO option is added, marks MACRO for tracing as soon as it
510    is defined.
512 ** Builtins are traced after renaming iff they were before.
514 ** Named files can now be undiverted.
516 ** The -Nnum option can be used to increase the number of divertions
517    available.
519 ** Calling changecom without arguments now disables all comment handling.
521 ** A bug in `dnl' is fixed.
523 ** A bug in the multi-character quoting code is fixed.
525 ** Several typos in the manual has been corrected.  More probably persist.
527 * Version 0.75 - November 1990, by Rene' Seindal
529 ** Implemented search path for include files (-I option and M4PATH
530    environment variable).
532 ** Implemented builtin `format' for printf-like formatting.
534 ** Implemented builtin `regexp' for searching for regular expressions.
536 ** Implemented builtin `patsubst' for substitution with regular
537    expressions.
539 ** Implemented builtin `esyscmd', which expands to a shell commands output.
541 ** Implemented `__file__' and `__line__' for use in error messages.
543 ** Implemented character ranges in `translit'.
545 ** Implemented control over debugging output.
547 ** Implemented multi-character quotes.
549 ** Implemented multi-character comment delimiters.
551 ** Changed predefined macro `gnu' to `__gnu__'.
553 ** Changed predefined macro `unix' to `__unix__', when the -G option is
554    not used.  With -G, `unix' is still defined.
556 ** Added program name to error messages.
558 ** Fixed two missing null bytes bugs.
560 * Version 0.50 - January 1990, by Rene' Seindal
562 * Initial beta release.
564 Local Variables:
565 fill-column: 75
566 End: